PhysicalAddress.None Field

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

Namespace:   System.Net.NetworkInformation
Assembly:  System (in System.dll)

public static readonly PhysicalAddress None

The Parse method returns None if you specify null address.

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

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

    return newAddress;
}

.NET Framework
Available since 2.0
Return to top
Show: