AsyncImageAndroid.TimeTake.LongMethod2 C# (CSharp) Method

LongMethod2() public static method

public static LongMethod2 ( ) : double
return double
			public static double LongMethod2 ()
			{
				double d = 1;
				for (int x = 0; x < 10000000; x++) {
					d += Math.Cos (d * x / 100.0);
				}
				return d;
			}

Usage Example

Ejemplo n.º 1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            this.downloadButton   = FindViewById <Button> (Resource.Id.downloadButton);
            this.clickButton      = FindViewById <Button> (Resource.Id.clickButton);
            this.infoLabel        = FindViewById <TextView> (Resource.Id.textView1);
            this.imageview        = FindViewById <ImageView> (Resource.Id.imageView1);
            this.downloadProgress = FindViewById <ProgressBar> (Resource.Id.progressBar);

            downloadButton.Click += DownloadAsync;

            clickButton.Click += delegate {
                clickButton.Text = string.Format("{0} clicks!", count++);
                //TODO:Remove the two methods below.
                TimeTake.LongMethod1();
                TimeTake.LongMethod2();
            };

            manager = new DownloadManager();
            manager.DownloadProgressChanged += HandleDownloadProgressChanged;
        }