Get TimeZoneInfo.AdjustmentRule objects that apply to the current TimeZoneInfo object in CSharp

Description

The following code shows how to get TimeZoneInfo.AdjustmentRule objects that apply to the current TimeZoneInfo object.

Example


//from w  ww. j ava2  s. co m
using System.Globalization;
using System.Collections.ObjectModel;
using System;
public class MainClass{
  public static void Main(String[] argv){  

   ReadOnlyCollection<TimeZoneInfo> timeZones = TimeZoneInfo.GetSystemTimeZones();
   string[] monthNames = CultureInfo.CurrentCulture.DateTimeFormat.MonthNames;

   foreach (TimeZoneInfo timeZone in timeZones)
   {
      TimeZoneInfo.AdjustmentRule[] adjustments = timeZone.GetAdjustmentRules();
   } 

  }
}




















Home »
  C# Tutorial »
    Data Types »




C# Data Types
Bool
Byte
Char
Decimal
Double
Float
Integer
Long
Short
String
C# Array
Array Example
Byte Array
C# Standard Data Type Format
BigInteger
Complex
Currency
DateTime
DateTimeOffset
DateTime Format Parse Convert
TimeSpan
TimeZone
Enum
Null
tuple
var