我有以下场景:
IPAddress ip; IPAddress.TryParse("192.168", out ip); if(ip == null){//do something with IP}
我希望解析失败,而不是解析为"192.0.0.168".我在这里错过了什么?(IPAddress.Parse的工作原理相同)
c# networking ip-address .net-4.0
.net-4.0 ×1
c# ×1
ip-address ×1
networking ×1