Q:

C# program to get the display name for the current time zone\'s daylight saving time (TimeZoneInfo.DaylightName Property)

0

Syntax:

    string TimeZoneInfo.DaylightName

Return value:

It returns a string value that denotes daylight saving time of the local time zone.

 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program:

The source code to get the display name for the current time zone's daylight saving time is given below. The given program is compiled and executed successfully.

using System;
using System.Globalization;

class TimeZoneInfoDemo
{
    //Entry point of Program
    static public void Main()
    {
        string dayLightName = "";
        TimeZoneInfo localTimeZone;

        localTimeZone = TimeZoneInfo.Local;
        dayLightName = localTimeZone.DaylightName;

        Console.WriteLine("DayLightName of Local Time Zone:\n"+dayLightName);
    }
}

Output:

DayLightName of Local Time Zone:
India Daylight Time
Press any key to continue . . .

 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now