Use the Parse() method to convert strings to TimeSpan instances
using System;
class MainClas
{
public static void Main()
{
TimeSpan myTimeSpan11 = TimeSpan.Parse("8:10:30");
Console.WriteLine("TimeSpan.Parse(\"8:10:30\") = " + myTimeSpan11);
}
}
Output TimeSpan.Parse("8:10:30") = 08:10:30
|
HTML code for linking to this page:
Related in same category :
-
|