C# IPAddress None

Description

IPAddress None Provides an IP address that indicates that no network interface should be used. This field is read-only.

Syntax

IPAddress.None has the following syntax.


public static readonly IPAddress None

Example

The following example uses the None property to indicate that no network interface should be used.


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

public class Example
{
   public static void Main()
   {
       // Gets the IP address indicating that no network interface should be used  
       // and converts it to a string. 
       string address = IPAddress.None.ToString();
       Console.WriteLine("IP address : " + address);
   }
}

The code above generates the following result.





















Home »
  C# Tutorial »
    System.Net »




Cookie
Dns
IPAddress
IPEndPoint
IPHostEntry
WebClient