PhysicalAddress.None 欄位
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回新的 PhysicalAddress 執行個體,其中含有長度為零的位址。 此欄位為唯讀。
public: static initonly System::Net::NetworkInformation::PhysicalAddress ^ None;
public static readonly System.Net.NetworkInformation.PhysicalAddress None;
staticval mutable None : System.Net.NetworkInformation.PhysicalAddress
Public Shared ReadOnly None As PhysicalAddress
欄位值
範例
下列程式代碼範例示範如何使用此欄位來測試剖析地址的結果。
PhysicalAddress^ StrictParseAddress( String^ address )
{
PhysicalAddress^ newAddress = PhysicalAddress::Parse( address );
if ( PhysicalAddress::None->Equals( newAddress ) )
return nullptr;
return newAddress;
}
public static PhysicalAddress? StrictParseAddress(string? address)
{
PhysicalAddress newAddress = PhysicalAddress.Parse(address);
if (PhysicalAddress.None.Equals(newAddress))
return null;
return newAddress;
}