Horje
Get mac address of Device - NAYCode.com Code Example
Get mac address of Device - NAYCode.com
  //**************** 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
c# tab select tab Code Example c# tab select tab Code Example
3(x-4)-2(3x+4)=4(3-x)+5x+4 Code Example 3(x-4)-2(3x+4)=4(3-x)+5x+4 Code Example
mydata api .net Code Example mydata api .net Code Example
mvc .testing nuget Code Example mvc .testing nuget Code Example
.net open config file by name Code Example .net open config file by name Code Example

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