10 thg 5, 2019

Get Machine name from IP Address c#

tham khảo tại đây.

Get Machine name from IP Address in C#

You can use this C# function to convert IP Address into Hostname in C#

private static string GetMachineNameFromIPAddress(string ipAdress)
        {
            string machineName = string.Empty;
            try
            {
                IPHostEntry hostEntry=Dns.GetHostEntry(ipAdress);
                machineName=hostEntry.HostName;
            }
            catch (Exception ex)
            {
                // Machine not found...
            }
            return machineName;
        }

Get Machine name from IP Address c# Rating: 4.5 Diposkan Oleh: http://pdunoteit.blogspot.com/