PhysicalAddress::ToString Method ()


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Returns the String representation of the address of this instance.

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

virtual String^ ToString() override

Return Value

Type: System::String^

A String containing the address contained in this instance.

The following code example demonstrates displaying the address in a PhysicalAddress instance.

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

.NET Framework
Available since 2.0
Return to top