Uri i = new Uri("http://www.baidu.com"); //可获取属性 UriBuilder u = new UriBuilder("http://www.baidu.com"); //可获取.设置属性 IPAddress ipAddress = IPAddress.Parse("192.168.31.34"); //ip地址转换 byte[] address = ipAddress.GetAddressBytes();
def str2bin(s): temp = s.split('.') result = '' for i in range(len(temp)): temp[i] = str(bin(int(temp[i]))[2:]) if len(temp[i]) < 8: temp[i] = '0'*(8-len(temp[i])) + tenp[i] result += str(temp[i]) return result