C# IPAddress IPAddress(Byte[])

Description

IPAddress IPAddress(Byte[]) Initializes a new instance of the IPAddress class with the address specified as a Byte array.

Syntax

IPAddress.IPAddress(Byte[]) has the following syntax.


public IPAddress(
  byte[] address
)

Parameters

IPAddress.IPAddress(Byte[]) has the following parameters.

  • address - The byte array value of the IP address.

Example

Initializes a new instance of the IPAddress class with the address specified as a Byte array.


using System;/*from   w  w w.jav a 2 s . co  m*/
using System.Net;
using System.Net.Sockets;

public class Example
{
    public static void Main()
    {
        IPAddress address = new IPAddress(new byte[]{1,1,1,1,1});
        Console.WriteLine(address.ToString());
    }
}




















Home »
  C# Tutorial »
    System.Net »




Cookie
Dns
IPAddress
IPEndPoint
IPHostEntry
WebClient