SHARE
TWEET

btnTest1.xaml.cs

zolffik May 1st, 2014 22 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Net;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Navigation;
  8. using Microsoft.Phone.Controls;
  9. using Microsoft.Phone.Shell;
  10. using System.Diagnostics;
  11. using System.Threading;
  12.  
  13. namespace testy_wp
  14. {
  15.     public partial class Test1 : PhoneApplicationPage
  16.     {
  17.         public Test1()
  18.         {
  19.             Stopwatch stopwatch = new Stopwatch();
  20.             stopwatch.Start();
  21.             double pi = 0;
  22.             for (int i = 1; i < 1000000000; i += 4)
  23.             {
  24.                 pi += 8.0 / (i * (i + 2L));
  25.             }
  26.             stopwatch.Stop();
  27.             WynikTest1.Text = (pi + stopwatch.Elapsed.TotalMilliseconds.ToString()  + " zajęło  ");
  28.         }
  29.     }
  30. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top