1-?-?add references System.Management 2-?-?coding... string strMac = string.Empty; ManagementClass mc = new ManagementClass("Win32_NetworkAdapterConfiguration"); ManagementObjectCollection moc = mc.GetInstances(); foreach (ManagementObject mo in moc) { if ((bool)mo["IPEnabled"] == true) { strMac += mo["MacAddress"].ToString(); } } 3-?-?as u can see..VA can't resolve the function GetInstances()
If you re-load the IDE does VA now understand the function GetInstances() ?
Which language are you programming in?
This might be a known problem, which we have fixed internally, where new references are not detected until the solution has been reloaded when programming in C++ CLR:
IDE:VS2008 Team edition language: C# I tried it again.VA won't resolve the function until I reopen the project. So, VA may have the same problem as in C++ CLR.