Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

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.

Parameters

address

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
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.