次の方法で共有


PhysicalAddress.ToString メソッド

定義

このインスタンスのアドレスの String 形式を返します。

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

戻り値

このインスタンスに格納されているアドレスを格納している String

次のコード例では、インスタンスにアドレスを表示する方法を PhysicalAddress 示します。

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

適用対象