Export (0) Print
Expand All

TimeZoneInfo.Equals Method (TimeZoneInfo)

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

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

public bool Equals(
	TimeZoneInfo other
)

Parameters

other
Type: System.TimeZoneInfo
A second TimeZoneInfo object to compare with the current TimeZoneInfo object.

Return Value

Type: System.Boolean
true if the two TimeZoneInfo objects are equal; otherwise, false.

Implements

IEquatable<T>.Equals(T)

Equality is based on a comparison of values.

If the other parameter is an uninitialized TimeZoneInfo object, this method returns false.

Version Notes

XNA Framework

 When this method is used in the XNA Framework, it throws a NotSupportedException exception.

The following example uses the Equals(TimeZoneInfo) method to determine whether a TimeZoneInfo variable is identical to the local time zone returned by the Local property.


TimeZoneInfo thisTimeZone;

thisTimeZone = TimeZoneInfo.Local;
outputBlock.Text += thisTimeZone.Equals(TimeZoneInfo.Local) + "\n";
outputBlock.Text += thisTimeZone.Equals(TimeZoneInfo.Utc) + "\n";


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft