C# TimeZoneInfo ToString
Description
TimeZoneInfo ToString
returns the current TimeZoneInfo
object's display name.
Syntax
TimeZoneInfo.ToString
has the following syntax.
public override string ToString()
Returns
TimeZoneInfo.ToString
method returns The value of the DisplayName property of the current TimeZoneInfo object.
Example
// ww w . ja v a 2s . co m
using System;
public class MainClass{
public static void Main(String[] argv){
TimeZoneInfo cst = TimeZoneInfo.FindSystemTimeZoneById("Central Standard Time");
Console.WriteLine( cst.ToString());
}
}
The code above generates the following result.