Collapse AllExpand All      Code: All Code: Multiple Code: Visual Basic Code: C# Code: Visual C++ Code: F# Code: JScript 
IPAddress Class

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Provides an Internet Protocol (IP) address.

System..::..Object
  System.Net..::..IPAddress

Namespace:   System.Net
Assembly:  System (in System.dll)
<SerializableAttribute> _
Public Class IPAddress
[SerializableAttribute]
public class IPAddress
[SerializableAttribute]
public ref class IPAddress
[<SerializableAttribute>]
type IPAddress =  class end
public class IPAddress

The IPAddress type exposes the following members.

  NameDescription
Public method IPAddress(array<Byte>[]()[][])Initializes a new instance of the IPAddress class with the address specified as a Byte array.
Public method IPAddress(Int64)Initializes a new instance of the IPAddress class with the address specified as an Int64.
Top
  NameDescription
Public method EqualsCompares two IP addresses. (Overrides Object..::..Equals(Object).)
Protected method FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAddressBytesProvides a copy of the IPAddress as an array of bytes.
Public method Static member GetDefaultLocalAddressRetrieves an IP address that is the local default address.
Public method GetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public method GetTypeGets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public method Static member ParseConverts an IP address string to an IPAddress instance.
Public method ToStringConverts an Internet address to its standard notation. (Overrides Object..::..ToString()()()().)
Top
  NameDescription
Public field Static member AnyProvides an IP address that indicates that the server must listen for client activity on all network interfaces. This field is read-only.
Public field Static member LoopbackProvides the IP loopback address. This field is read-only.
Top

The IPAddress class contains the address of a computer on an IP network.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.