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
C# IP地址验证
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
1269

被折叠的 条评论
为什么被折叠?