可我不知道该加在哪,这是原代码段,请你看看该在哪加数据,谢谢!
private void SniffWindow_Load(object sender, EventArgs e)
{
ManagementObjectSearcher query1 = new
ManagementObjectSearcher("SELECT * FROM Win32_NetworkAdapterConfiguration");
ManagementObjectCollection queryCollection1 = query1.Get();
string[] IPString = new string[10];
int x = 0;
string[] temp;
foreach (ManagementObject mo in queryCollection1)
{
temp = mo["IPAddress"] as string[];
if (temp != null)
{
foreach (string st in temp)
{
IPString[x] = st;
x++;
}
}
}