Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Hi all, Im really new with .NET, I tried to make a little program on VB. NET, Im really new with this, and I cant contionue because I cant convert the system.string into a normal string, Ihave this:
Dim management As ManagementClass = New Management.ManagementClass("Win32_NetworkAdapterConfiguration")
Dim colNicConfig As ManagementObjectCollection = management.GetInstances()
Dim txtDireccionIP() As String
For Each mgr As ManagementObject In management.GetInstances()
If mgr.Item("IPEnabled") Then
txtDireccionIP = mgr.Item("IPAddress").ToString.Split(",")
but txtDireccionIP variable just show system.string, why? because is an array?, I tried split it, get elements with a for each but nothing, what Im missing?
I just found the element IPEnabled as:
Data type: string array
Access type: Read-only
Array of all of the IP addresses associated with the current network adapter.
but then how can I get the real value??
or pls where can I get more information??, I found a routine that makes almost the same, but it was written on C# and of course I want to do it by myself.