PhysicalAddress.Equals(Object) Método
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Compara dos instancias de PhysicalAddress.
public:
override bool Equals(System::Object ^ comparand);
public override bool Equals (object? comparand);
public override bool Equals (object comparand);
override this.Equals : obj -> bool
Public Overrides Function Equals (comparand As Object) As Boolean
Parámetros
- comparand
- Object
PhysicalAddress que se va a comparar con la instancia actual.
Devoluciones
true
si esta instancia y la instancia especificada contienen la misma dirección; de lo contrario, false
.
Ejemplos
En el ejemplo de código siguiente se comparan dos PhysicalAddress instancias.
void ParseTest()
{
PhysicalAddress^ address = PhysicalAddress::Parse( L"AC1EBA22" );
Console::WriteLine( L"Address parsed as {0}", address->ToString() );
PhysicalAddress^ address2 = PhysicalAddress::Parse( L"ac1eba22" );
Console::WriteLine( L"Address2 parsed as {0}", address2->ToString() );
bool test = address->Equals( address2 );
Console::WriteLine( L"Equal? {0}", test );
}
public static void ParseTest()
{
PhysicalAddress address = PhysicalAddress.Parse("AC1EBA22");
Console.WriteLine("Address parsed as {0}", address.ToString());
PhysicalAddress address2 = PhysicalAddress.Parse("ac1eba22");
Console.WriteLine("Address2 parsed as {0}", address2.ToString());
bool test = address.Equals(address2);
Console.WriteLine("Equal? {0}", test);
}