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






TimeSpan.FromDays

  


using System;

class MainClas
{
  public static void Main()
  {
    TimeSpan myTimeSpan5 = TimeSpan.FromDays(5);
    Console.WriteLine("TimeSpan.FromDays(5) = " + myTimeSpan5);
    TimeSpan myTimeSpan6 = TimeSpan.FromHours(10);
    Console.WriteLine("TimeSpan.FromHours(10) = " + myTimeSpan6);
    TimeSpan myTimeSpan7 = TimeSpan.FromMinutes(30);
    Console.WriteLine("TimeSpan.FromMinutes(30) = " + myTimeSpan7);
    TimeSpan myTimeSpan8 = TimeSpan.FromSeconds(15);
    Console.WriteLine("TimeSpan.FromSeconds(15) = " + myTimeSpan8);
    TimeSpan myTimeSpan9 = TimeSpan.FromMilliseconds(200);
    Console.WriteLine("TimeSpan.FromMilliseconds(200) = " + myTimeSpan9);
    TimeSpan myTimeSpan10 = TimeSpan.FromTicks(500);
    Console.WriteLine("TimeSpan.FromTicks(500) = " + myTimeSpan10);
  }
}

   
    
  








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.Milliseconds
8.TimeSpan.Negate()
9.TimeSpan.Parse
10.TimeSpan.Subtract(TimeSpan ts)
11.TimeSpan.TicksPerDay
12.TimeSpan.TotalDays