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
Colaborați cu noi pe GitHub
Sursa pentru acest conținut poate fi găsită pe GitHub, unde puteți, de asemenea, să creați și să consultați probleme și solicitări de tragere. Pentru mai multe informații, consultați ghidul nostru pentru colaboratori.