Hello,
I wonder what is the problem?
C#:
using System;using System.Collections;
using System.Management;
using System.Net.NetworkInformation;
using System.Security.Cryptography;
using System.Text;
using Microsoft.Win32;
class Program
{
public static void Main(string[] args)
{
string resultado = string.Empty;
resultado = GetMacAddress();
Console.Write("Press any key to continue . . . ... ");
Console.ReadKey(true);
}
public static string GetMacAddress()
{
string text = "";
NetworkInterface[] allNetworkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
foreach (NetworkInterface networkInterface in allNetworkInterfaces)
{
PhysicalAddress physicalAddress = networkInterface.GetPhysicalAddress();
text += physicalAddress.ToString();
}
return text;
}
}
I wonder what is the problem?