C# IPAddress IPAddress(Int64)

Description

IPAddress IPAddress(Int64) Initializes a new instance of the IPAddress class with the address specified as an Int64.

Syntax

IPAddress.IPAddress(Int64) has the following syntax.


public IPAddress(
  long newAddress
)

Parameters

IPAddress.IPAddress(Int64) has the following parameters.

  • newAddress - The long value of the IP address. For example, the value 0x2414188f in big-endian format would be the IP address "143.24.20.36".

Example


using System;//from  www .j av  a 2  s .  co m
using System.Net;
using System.Net.Sockets;

public class Example
{
   public static void Main()
   {
       IPAddress address = new IPAddress(0x2112188f);
       Console.WriteLine(address.ToString());
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Net »




Cookie
Dns
IPAddress
IPEndPoint
IPHostEntry
WebClient