PhysicalAddress.None Feld

Definition

Gibt eine neue PhysicalAddress Instanz mit einer Nulllängenadresse zurück. Dieses Feld ist schreibgeschützt.

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 

Feldwert

Beispiele

Das folgende Codebeispiel veranschaulicht die Verwendung dieses Felds zum Testen des Ergebnisses der Analyse einer Adresse.

public static PhysicalAddress? StrictParseAddress(string? address)
{
    PhysicalAddress newAddress = PhysicalAddress.Parse(address);
    if (PhysicalAddress.None.Equals(newAddress))
        return null;

    return newAddress;
}

Hinweise

Die Parse Methode gibt zurück None , wenn Sie die Adresse angeben null .

Gilt für: