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