Archive for the ‘Code Snippets’ Category

Getting MAC Address in .Net

Monday, March 5th, 2007 |

Below is the VB.Net snippet to retrieve MAC address available on your machine.

‘Add reference to system.management

Imports System.Management

Private Sub GetMACAddress()

Dim oMClass As ManagementClass = New _ ManagementClass(”Win32_NetworkAdapterConfiguration”)
Dim colMObj As ManagementObjectCollection = oMClass.GetInstances()

For Each objMO As ManagementObject In colMObj
console.WriteLine (objMO(”MacAddress”).ToString)
Next

End Sub

Popularity: 20% [?]

If you like this post, you may want to subscribe to my RSS feed.

About Us

This site is pretty much dedicated to tech-related news, gadget, reviews and what's hot in Internet. Occasionally we are giving out free software too. More

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :