แก้ไข

แชร์ผ่าน


PhysicalAddress.None Field

Definition

Returns a new PhysicalAddress instance with a zero length address. This field is read-only.

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 

Field Value

Examples

The following code example demonstrates using this field to test the result of parsing an address.

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

Remarks

The Parse method returns None if you specify null address.

Applies to