fork download
  1. using System;
  2. using System.Net.NetworkInformation;
  3.  
  4. class Program
  5. {
  6. static void Main()
  7. {
  8. NetworkInterface[] nics = NetworkInterface.GetAllNetworkInterfaces();
  9. foreach (NetworkInterface adapter in nics)
  10. {
  11. if (adapter.OperationalStatus == OperationalStatus.Up)
  12. {
  13. Console.WriteLine("MAC 주소: " + adapter.GetPhysicalAddress());
  14. break;
  15. }
  16. }
  17. }
  18. }
Success #stdin #stdout 0.04s 29052KB
stdin
ㄴㅇㅀ
stdout
Standard output is empty