问题
I am finding difficulty in using System.Net.IPAddress or any similar types in Windows 8 Metro Apps. I am creating an application that will run in an intranet environment and the users will connect to remote servers using IPAddress.
But somehow I am not able to use it. Also, in Windows.Networking.EndpointPair class, I cant find any option to pass IPAddress specifically
Kindly help with this. Thanx of help in advance
回答1:
You can use the HostName class to represent an IP Address. When you create the EndpointPair, you have a remote and a local host. Check out the StreamSocket sample. System.Net.IPAddress is not part of the .NET Core Profile and is thus not available from Metro style apps.
来源:https://stackoverflow.com/questions/11068940/unable-to-use-ipaddress-or-similar-type-in-windows-8-metro-style-apps