This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string getMacAddreess() { | |
// アダプタリストを取得する | |
NetworkInterface[] adapters = NetworkInterface.GetAllNetworkInterfaces(); | |
foreach (NetworkInterface adapter in adapters) { | |
// 物理(MAC)アドレスの取得 | |
PhysicalAddress mac = adapter.GetPhysicalAddress(); | |
return mac.ToString(); | |
} | |
return ""; | |
} |