Equals Method (TimeZoneInfo.AdjustmentRule)
Collapse the table of content
Expand the table of content

TimeZoneInfo.AdjustmentRule.Equals Method (TimeZoneInfo.AdjustmentRule)


Determines whether the current TimeZoneInfo.AdjustmentRule object is equal to a second TimeZoneInfo.AdjustmentRule object.

Namespace:   System
Assembly:  mscorlib (in mscorlib.dll)

abstract Equals : 
        other:TimeZoneInfo.AdjustmentRule -> bool
override Equals : 
        other:TimeZoneInfo.AdjustmentRule -> bool


Type: System.TimeZoneInfo.AdjustmentRule

The object to compare with the current object.

Return Value

Type: System.Boolean

true if both TimeZoneInfo.AdjustmentRule objects have equal values; otherwise, false.

To determine whether two TimeZoneInfo.AdjustmentRule objects are equal, the Equals(TimeZoneInfo.AdjustmentRule) method compares the member values of each object. Two adjustment rules are equal if they have the same effective dates, the same delta, and identical values for the TimeZoneInfo.TransitionTime objects returned by their DaylightTransitionStart and DaylightTransitionEnd properties.

The following example calls the TimeZoneInfo.AdjustmentRule.Equals(TimeZoneInfo.AdjustmentRule) method to compare the adjustment rules for Central Standard Time with those for Canada Central Standard Time and Mexico Standard Time.

No code example is currently available or this language may not be supported.

This code displays the following output to the console:

Comparing Central Standard Time rule for 1/1/0001 to 12/31/9999 with:
   Canada Central Standard Time has no adjustment rules.
   Mexican CST for 1/1/0001 to 12/31/9999: Equal

.NET Framework
Available since 3.5
Return to top
© 2015 Microsoft