TimeSpan.TotalDays : TimeSpan « System « C# / C Sharp by API






TimeSpan.TotalDays

  


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);
    
  }
}

   
    
  








Related examples in the same category

1.new TimeSpan(days, hours, minutes, seconds)
2.new TimeSpan(days, hours, minutes, seconds, milliseconds
3.new TimeSpan(ticks)
4.TimeSpan + TimeSpan
5.TimeSpan.Add(TimeSpan ts)
6.TimeSpan.Duration()
7.TimeSpan.FromDays
8.TimeSpan.Milliseconds
9.TimeSpan.Negate()
10.TimeSpan.Parse
11.TimeSpan.Subtract(TimeSpan ts)
12.TimeSpan.TicksPerDay