System.Net.NetworkInformation.SystemNetworkInterface.GetPhysicalAddress C# (CSharp) Method

GetPhysicalAddress() public method

public GetPhysicalAddress ( ) : System.Net.NetworkInformation.PhysicalAddress
return System.Net.NetworkInformation.PhysicalAddress
        public override PhysicalAddress GetPhysicalAddress()
        {
            byte[] newAddr = new byte[_addressLength];

            // Buffer.BlockCopy only supports int while addressLength is uint (see IpAdapterAddresses).
            // Will throw OverflowException if addressLength > Int32.MaxValue.
            Buffer.BlockCopy(_physicalAddress, 0, newAddr, 0, checked((int)_addressLength));
            return new PhysicalAddress(newAddr);
        }