Export (0) Print
Expand All

TimeZoneInfo.Equals Method (Object)

.NET Framework 4.5

Determines whether the current TimeZoneInfo object and another object are equal.

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

abstract Equals : 
        obj:Object -> bool  
override Equals : 
        obj:Object -> bool

Parameters

obj
Type: System.Object

A second object to compare with the current object.

Return Value

Type: System.Boolean
true if obj is a TimeZoneInfo object that is equal to the current instance; otherwise, false.

This method converts or casts obj to a TimeZoneInfo object and compares it with the current instance. The test for equality is based on a comparison of values. The current TimeZoneInfo instance and obj are considered to be equal under the following conditions:

  • The run-time type of obj is TimeZoneInfo.

  • The two objects have the same Id property value.

  • The two objects have the same adjustment rules.

If obj is a null reference (Nothing in Visual Basic), this method returns false.

The following example uses the Equals(Object) method to determine whether the local time zone is Pacific Time or Eastern Time.

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

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft