Predefined IP Address
In this chapter you will learn:
- What is the Loopback IP Address
- What is the Broadcast IP Address
- What is Any IP Address
- What is the None IP Address
IPAddress.Loopback
using System;//from j ava 2s .co m
using System.Net;
class MainClass
{
public static void Main()
{
IPAddress test = IPAddress.Loopback;
Console.WriteLine(test);
}
}
The code above generates the following result.
IPAddress.Broadcast
using System;//from j av a2 s. c o m
using System.Net;
class MainClass
{
public static void Main()
{
IPAddress test = IPAddress.Broadcast;
Console.WriteLine(test);
}
}
The code above generates the following result.
IPAddress.Any
using System;//from j a v a 2 s . c o m
using System.Net;
class MainClass
{
public static void Main()
{
IPAddress test = IPAddress.Any;
Console.WriteLine(test);
}
}
The code above generates the following result.
IPAddress.None
using System;//from j a v a 2 s. c o m
using System.Net;
class MainClass
{
public static void Main()
{
IPAddress test = IPAddress.None;
Console.WriteLine(test);
}
}
The code above generates the following result.
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Network