Syntax:
TimeSpan TimeSpan.FromMilliseconds(double millisecs);
Parameter(s):
- millisecs: A specified number of milliseconds.
Return value:
This method returns the object of TimeSpan object which is used to represent a specified number of milliseconds that are accurate to the nearest millisecond.
Exception(s):
- System.OverflowException
- System.ArgumentException
-
Program:
The source code to demonstrate the use of FromMilliseconds() method of TimeSpan structure is given below. The given program is compiled and executed successfully.
Output: