string ipStr="172.27.190.117";
IPAddress ip;
if(IPAddress.TryParse(ipStr,out ip))
{
MessageBox.Show("合法IP");
}
else
{
MessageBox.Show("非IP");
}
转载于:https://www.cnblogs.com/ssjsk/p/5826451.html
string ipStr="172.27.190.117";
IPAddress ip;
if(IPAddress.TryParse(ipStr,out ip))
{
MessageBox.Show("合法IP");
}
else
{
MessageBox.Show("非IP");
}
转载于:https://www.cnblogs.com/ssjsk/p/5826451.html