string noadd = "0.0.0.0"; System.Net.IPAddress ipaddr = System.Net.IPAddress.Parse(noadd); ipaddr = System.Net.IPAddress.None; string tmp = System.Net.IPAddress.None.ToString(); // produces "255.255.255.255" tmp = System.Net.IPAddress.Loopback.ToString(); // produces "127.0.0.1" tmp = System.Net.IPAddress.Any.ToString(); // produces "0.0.0.0" tmp = System.Net.IPAddress.Broadcast.ToString(); // produces "255.255.255.255" ipaddr = System.Net.IPAddress.Parse(""); tmp = ipaddr.ToString(); // produces "0.0.0.0" ipaddr = System.Net.IPAddress.Parse("0"); tmp = ipaddr.ToString(); // produces "0.0.0.0" ipaddr = System.Net.IPAddress.Parse("0.0"); tmp = ipaddr.ToString(); // produces "0.0.0.0" ipaddr = System.Net.IPAddress.Parse("0.0.0"); tmp = ipaddr.ToString(); // produces "0.0.0.0" ipaddr = System.Net.IPAddress.Parse("0.0.0.0"); tmp = ipaddr.ToString(); // produces "0.0.0.0"
February 24, 2006
System.Net.IPAddress Tests
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment