This documentation is archived and is not being maintained.
RegionInfo::Equals Method
Visual Studio 2010
Determines whether the specified object is the same instance as the current RegionInfo.
Assembly: mscorlib (in mscorlib.dll)
Parameters
- value
- Type: System::Object
The object to compare with the current RegionInfo.
Return Value
Type: System::Booleantrue if the value parameter is a RegionInfo object and its Name property is the same as the Name property of the current RegionInfo object; otherwise, false.
This method overrides Object::Equals.
The following code example compares two instances of RegionInfo that were created differently.
using namespace System; using namespace System::Globalization; int main() { // Creates a RegionInfo using the ISO 3166 two-letter code. RegionInfo^ myRI1 = gcnew RegionInfo( "US" ); // Creates a RegionInfo using a CultureInfo.LCID. RegionInfo^ myRI2 = gcnew RegionInfo( (gcnew CultureInfo( "en-US",false ))->LCID ); // Compares the two instances. if ( myRI1->Equals( myRI2 ) ) Console::WriteLine( "The two RegionInfo instances are equal." ); else Console::WriteLine( "The two RegionInfo instances are NOT equal." ); } /* This code produces the following output. The two RegionInfo instances are equal. */
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, 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: