This documentation is archived and is not being maintained.
TimeZoneInfo::HasSameRules Method
Visual Studio 2010
Indicates whether the current object and another TimeZoneInfo object have the same adjustment rules.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- other
- Type: System::TimeZoneInfo
A second object to compare with the current TimeZoneInfo object.
Return Value
Type: System::Booleantrue if the two time zones have identical adjustment rules and an identical base offset; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | The other parameter is nullptr. |
Like the TimeZoneInfo::Equals(TimeZoneInfo) method, the HasSameRules method indicates whether two time zones have the same base offset (as defined by the BaseUtcOffset property) and the same adjustment rules. Unlike the TimeZoneInfo::Equals(TimeZoneInfo) method, HasSameRules does not compare time zone identifiers (as defined by the Id property).
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: