将IP地址形式的字符串中包含的数字截取出来,如
aa=10.9.1.1 截取为a=10 b=9 c=1 d=1
bb=192.168.0.1 截取为a=192 b=168 c=0 d=1请高手指点
aa=10.9.1.1 截取为a=10 b=9 c=1 d=1
bb=192.168.0.1 截取为a=192 b=168 c=0 d=1请高手指点
解决方案 »
- WPF数据绑定与获取
- 一个服务器端程序与多个客户端连接通信TCP Socket
- C# 失去焦点问题
- webbrowser在遇见多个iframe网页时重复调用DocumentComplete
- 用HttpWebRequest下载文件,GetResponse的时候失败,总报由于套接字没有连接并且(当使用一个 sendto 调用发送数据报套接字时)没有提供地址,发送或接收数据的请求没有被接受。
- c#里怎样实现字符串转换为数字?
- 各位哥哥姐姐发个vs2005 team的下载链接给我萨
- C#怎么合并多个word文档
- 一个刚开的好论坛,希望大家去灌水呀!
- 请教各位一个问题??(在线等,急!)
- 求助
- winform 中在一个窗体中改变另一个窗体控件的值!!
string[] ip1 = ip.split('=');
string[] ip2 = ip1[1].split('.');
string a= ip2[0];
string b= ip2[1];
string c= ip2[2];
string d= ip2[3];
string ip = "192.168.0.1";
string[] ss = ip.Split('.');
string a, b, c, d;
a = ss[0];
b = ss[1];
c = ss[2];
d = ss[3];
string a=ip.Split('.')[0].tostring();
string b=ip.Split('.')[1].tostring();
string c=ip.Split('.')[2].tostring();
string d=ip.Split('.')[3].tostring();