PhysicalAddress.ToString Methode

Definition

Gibt die String-Darstellung der Adresse dieser Instanz zurück.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

Gibt zurück

Ein String mit der in dieser Instanz enthaltenen Adresse.

Beispiele

Im folgenden Codebeispiel wird die Anzeige der Adresse in einem PhysicalAddress instance veranschaulicht.

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);
}

Gilt für: