IP地址整型与格式化字符串转换
IPAddress ip = IPAddress.Parse("59.32.0.0");
byte[] bip = ip.GetAddressBytes();
uint a = BitConverter.ToUInt32(bip, 0);
a ^= (uint)Math.Pow(2, 8);
ip = new IPAddress(a);
Console.Write(ip.ToString());
结果:59.33.0.0
byte[] bip = ip.GetAddressBytes();
uint a = BitConverter.ToUInt32(bip, 0);
a ^= (uint)Math.Pow(2, 8);
ip = new IPAddress(a);
Console.Write(ip.ToString());
结果:59.33.0.0