I need to convert the following code to work in a visual studio 2008 windows form application, can anyone help? At the moment ObjectQuery, ManagementObjectSearcher, ManagementObject and ManagementObjectCollection are not valid.

Code:
                Dim objectQuery As New ObjectQuery("SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionId IS NOT NULL")
                Dim searcher As New ManagementObjectSearcher(Scope, objectQuery)
                Dim os As ManagementObject
                Dim moColl As ManagementObjectCollection = searcher.Get()
                Dim _list As String = ""
                For Each os In moColl
                    Console.WriteLine(os("NetConnectionId"))
                Next os