C# IPAddress Address

Description

IPAddress Address An Internet Protocol (IP) address.

Syntax

IPAddress.Address has the following syntax.


[ObsoleteAttribute("This property has been deprecated. It is address family dependent. Please use IPAddress.Equals method to perform comparisons. http://go.microsoft.com/fwlink/?linkid=14202")]
public long Address { get; set; }

Example

The following example uses the Address parameter to retrieve the IP address of the IPAddress instance.


using System;//  w w  w.j a  v a 2 s. c  om
using System.Net;
using System.Net.Sockets;

public class Example
{
    public static void Main()
    {
        // Creates an instance of the IPAddress for the specified IP string in  
        // dotted-quad notation. 
        IPAddress hostIPAddress = IPAddress.Parse("127.0.0.1");
        Console.WriteLine(hostIPAddress.ToString());
    }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Net »




Cookie
Dns
IPAddress
IPEndPoint
IPHostEntry
WebClient