Share via


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.

Inheritance Hierarchy

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

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

Syntax

'Declaration
<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.

Constructors

  Name Description
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

Methods

  Name Description
Public method Equals Compares two IP addresses. (Overrides Object. . :: . .Equals(Object).)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetAddressBytes Provides a copy of the IPAddress as an array of bytes.
Public methodStatic member GetDefaultLocalAddress Retrieves an IP address that is the local default address.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic member Parse Converts an IP address string to an IPAddress instance.
Public method ToString Converts an Internet address to its standard notation. (Overrides Object. . :: . .ToString() () () ().)

Top

Fields

  Name Description
Public fieldStatic member Any Provides an IP address that indicates that the server must listen for client activity on all network interfaces. This field is read-only.
Public fieldStatic member Loopback Provides the IP loopback address. This field is read-only.

Top

Remarks

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

Thread Safety

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

See Also

Reference

System.Net Namespace