using System;
class MainClas
{
public static void Main()
{
long ticks = 300;
TimeSpan myTimeSpan = new TimeSpan(ticks);
Console.WriteLine("myTimeSpan.Days = " + myTimeSpan.Days);
Console.WriteLine("myTimeSpan.Hours = " + myTimeSpan.Hours);
Console.WriteLine("myTimeSpan.Minutes = " + myTimeSpan.Minutes);
Console.WriteLine("myTimeSpan.Seconds = " + myTimeSpan.Seconds);
Console.WriteLine("myTimeSpan.Milliseconds = " + myTimeSpan.Milliseconds);
Console.WriteLine("myTimeSpan.Ticks = " + myTimeSpan.Ticks);
Console.WriteLine("myTimeSpan.TotalDays = " + myTimeSpan.TotalDays);
Console.WriteLine("myTimeSpan.TotalHours = " + myTimeSpan.TotalHours);
Console.WriteLine("myTimeSpan.TotalMinutes = " + myTimeSpan.TotalMinutes);
Console.WriteLine("myTimeSpan.TotalSeconds = " + myTimeSpan.TotalSeconds);
Console.WriteLine("myTimeSpan.TotalMilliseconds = " + myTimeSpan.TotalMilliseconds);
}
}
|