在C#中,如何解析主机的IP地址? [英] In C#, how do I resolve the IP address of a host?
本文介绍了在C#中,如何解析主机的IP地址?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何动态获取服务器(要连接的PC)的IP地址?
How can you dynamically get the IP address of the server (PC which you want to connect to)?
推荐答案
System.Dns.GetHostEntry 可用于将名称解析为IP地址.
System.Dns.GetHostEntry can be used to resolve a name to an IP address.
这篇关于在C#中,如何解析主机的IP地址?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文