Read MAC Address from network adapter in .NET

前端 未结 7 2008
梦谈多话
梦谈多话 2020-11-29 07:02

I\'d like to be able to read the mac address from the first active network adapter using VB.net or C# (using .NET 3.5 SP1) for a winform application

7条回答
  •  孤街浪徒
    2020-11-29 07:26

    You need to DllImport GetAdaptersInfo -- here's some C# code

    http://www.codeguru.com/cpp/i-n/network/networkinformation/comments.php/c5451/?thread=60212

提交回复
热议问题