How to Validate IP Address

Ssj_Kumar
Posted by Ssj_Kumar under C# category on | Points: 40 | Views : 661
string strIPAddress="172.0.0.1";
System.Net.IPAddress IPaddress;
if (System.Net.IPAddress.TryParse(strIPAddress, out IPaddress))
{
//Valide IP Address
}
else
{
//Not Valide IP Address
}

Comments or Responses

Login to post response