Hi,
你可以通过DatagramSocket的这个方法得到:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.sockets.datagramsocket.getendpointpairsasync.aspx
得到的EndpointPair中的RemoteHostName是可以得到IP地址的,EndPointPair.RemoteHostName参考:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.endpointpair.remotehostname.aspx
Aaron Xue [MSFT] MSDN Community Support | Feedback to us Get or Request Code Sample from Microsoft Please remember to mark the replies as answers if they help and unmark them if they provide no help.