hogni89
hogni89

Reputation: 1754

'TotalMilliseconds' in .NET Micro Framework

I'm a Java developer and recently started on a Netduino hobby project. I have encountered a strange problem. My compiler tells me that there is no such thing as TimeSpan.TotalMilliseconds.

Is it true, that TotalMilliseconds is something only the desktop version of .NET contains?

Upvotes: 0

Views: 500

Answers (2)

Claies
Claies

Reputation: 22323

It is true. The TotalMilliseconds() property does not exist in the .NET Micro Framework. See MSDN reference for Timespan in Desktop Framework vs. MSDN reference for Timespan in Micro Framework.

Upvotes: 3

Matt Johnson-Pint
Matt Johnson-Pint

Reputation: 241838

It doesn't exist in the .NET Micro Framework. Use this instead:

double totalMilliseconds = theTimeSpan.Ticks / 10000.0;

Upvotes: 2

Related Questions