C# TimeZoneInfo DisplayName
Description
TimeZoneInfo DisplayName
gets the general display name
that represents the time zone.
Syntax
TimeZoneInfo.DisplayName
has the following syntax.
public string DisplayName { get; }
Example
The following example retrieves a TimeZoneInfo object that represents the local time zone and outputs its display name.
/*from ww w . j a v a 2 s . co m*/
using System;
public class MainClass{
public static void Main(String[] argv){
TimeZoneInfo localZone = TimeZoneInfo.Local;
Console.WriteLine(" Display Name is: {0}.", localZone.DisplayName);
}
}
The code above generates the following result.