PhysicalAddress.None Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.