Parse Method
Collapse the table of content
Expand the table of content

PhysicalAddress.Parse Method

Parses the specified String and stores its contents as the address bytes of the PhysicalAddress returned by this method.

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

public static PhysicalAddress Parse (
	string address
public static PhysicalAddress Parse (
	String address
public static function Parse (
	address : String
) : PhysicalAddress
Not applicable.



A String containing the address that will be used to initialize the PhysicalAddress instance returned by this method.

Return Value

A PhysicalAddress instance with the specified address.

Use the GetAddressBytes method to retrieve the address from an existing PhysicalAddress instance.

The following code example creates a PhysicalAddress instance by calling the Parse method.

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

    return newAddress;

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

© 2016 Microsoft