C# TimeZone Equals(Object)
Description
TimeZone Equals(Object)
determines whether the specified
object is equal to the current object.
Syntax
TimeZone.Equals(Object)
has the following syntax.
public virtual bool Equals(
Object obj
)
Parameters
TimeZone.Equals(Object)
has the following parameters.
obj
- The object to compare with the current object.
Returns
TimeZone.Equals(Object)
method returns true if the specified object is equal to the current object; otherwise, false.
Example
The following code shows how to use TimeZone.Equals(Object)
.
/* w w w .j a v a 2s .c om*/
using System;
using System.Globalization;
class TimeZoneDemo
{
static void Main( )
{
// Get the local time zone and the current local time and year.
TimeZone localZone = TimeZone.CurrentTimeZone;
TimeZone localZone1 = TimeZone.CurrentTimeZone;
Console.WriteLine(localZone.Equals(localZone1) );
}
}
The code above generates the following result.