unable to use IPAddress or similar type in windows 8 metro style apps

强颜欢笑 提交于 2019-12-13 14:32:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!