2

in MonoDevelop fro Unity I'm using C# to develop my "great" game. I'm using stopwatch there, and funny enough there isn't restart method in this class even though it is listed here:
http://msdn.microsoft.com/en-us/library/system.diagnostics.stopwatch.aspx#Y292

Am I missing something?

4

2 回答 2

5

Are you using .Net 4.0? That method appears to be only in .Net 4.0/4.5. Anything prior you should use the Reset() method.

于 2012-05-27T11:07:45.620 回答
4

Stopwatch.Restart documentation clearly suggests that this method is available in .NET 4.0 and .NET 4.5.

Seems like you are targetting to .NET runtime lower than .NET 4.0

于 2012-05-27T11:08:35.423 回答