Horje
Get Mac address of Device in Xamarin Code Example
Get Mac address of Device in Xamarin
  //******************* Source: NAYCode.com
private string GetDeviceInfo()
        {
            string mac = string.Empty;
            string ip = string.Empty;

            foreach (var netInterface in NetworkInterface.GetAllNetworkInterfaces())
            {
                if (netInterface.NetworkInterfaceType == NetworkInterfaceType.Wireless80211 ||
                    netInterface.NetworkInterfaceType == NetworkInterfaceType.Ethernet)
                {
                    var address = netInterface.GetPhysicalAddress();
                    mac = BitConverter.ToString(address.GetAddressBytes());

                    IPAddress[] addresses = Dns.GetHostAddresses(Dns.GetHostName());
                    if (addresses != null && addresses[0] != null)
                    {
                        ip = addresses[0].ToString();
                        break;
                    }
                }
            }

            return mac;
        }
      
Source: naycode.com




Csharp

Related
Get unique id of Device Code Example Get unique id of Device Code Example
boxing and unboxing in c# Code Example boxing and unboxing in c# Code Example
draw on picturebox c# Code Example draw on picturebox c# Code Example
c# xml comment type reference Code Example c# xml comment type reference Code Example
unity c# find object position in array Code Example unity c# find object position in array Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9