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.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version