C# 编程实现获取指定网卡的多个IP和子网掩码列表Dictionary<int, string> Get_IPAddress_IPSubnet_List(string adapter) // adapter为指定的网卡
{
......
}C#
{
......
}C#
解决方案 »
- TreeView绑定问题
- listview 如何实现多列排序
- 跪求高手:datagrid编辑状态下,如何通过回车触发update按钮(C#,WebForm)
- C# 添加子节点 问题
- 大家讨论一个翻转字符串的通用算法
- 关于多的时间变量的各个部分组成一个时间变量的问题。
- c#与Access的报表
- HttpWebResponse的http头乱码的问题
- listview的remove问题
- ArrayList中是数字,使用ArrayList.Sort()从小到大,是否要自己实现IComparable 接口?
- 连Oracle数据库问题
- “System.Net.HttpWebResponse”不包含“Dispose”的定义,并且找不到可接受类型为“System.Net.HttpWebR
oreach(NetworkInterface ni in NetworkInterface.GetAllNetworkInterfaces())
{
if(ni.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
{
foreach (UnicastIPAddressInformation ip in ni.GetIPProperties().UnicastAddresses)
{
Console.WriteLine(ip.Address);
Console.WriteLine(ip.IPv4Mask); //当IPv4的时候
}
}
}