flitjes

wtf?

Nov 8th, 2013
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. if (sw ==null)
  2. {
  3.     sw = new Stopwatch();
  4.     ResetStopwatch();
  5. }
  6.  
  7. // Was the following: the purpose was: check if there is a stopwatch, if not, do the create one and reset it.
  8. // the code above seems simpeler
  9.  
  10. //try
  11. //{
  12. //    bool check = sw.IsRunning;
  13. //}
  14. //catch
  15. //{
  16. //    sw = new Stopwatch();
  17. //    ResetStopwatch();
  18. //}
Advertisement
Add Comment
Please, Sign In to add comment