How To Get the List of Network Connections [Conditions Tab]

Topics: Examples
Aug 26, 2015 at 6:09 AM
I am trying to get the list of the Network Connections under the Conditions Tab.
However I am not able to find any object from the wrapper which allows me to retrieve the network connections list.

Any help will be appreciated
Thanks
Coordinator
Aug 26, 2015 at 1:47 PM
The class used is not exposed publicly in the library. In the Source Code, look under the TaskEditor project, Native directory and find the NetworkProfile.cs class file. This is what you need. There is a static method on the class that retrieves the list of instances.
foreach (var item in Microsoft.Win32.NativeMethods.NetworkProfile.GetAllLocalProfiles())
   Console.WriteLine($"Network connection {item.Name} had an ID of {item.Id}");
Marked as answer by dahall on 9/1/2015 at 9:26 AM
Aug 27, 2015 at 10:21 AM
Thanks. Its working perfectly now.