Question

I know that Windows App Store applications have limited support for the System.Net namespace.

I know that for TCP and UDP protocols, the Windows.Networking namespace contains equivalents such as StreamSocket, DataReader, DataWriter, etc.

There are a few other important objects in System.Net that i use, which i cant seem to find the equivalent for in WinRT. Specifically these ones:

MailAddress
ContentType
ContentDisposition
Thread

Anyone know the equivalent for these?

Was it helpful?

Solution

As far as I know, there are no equivalent objects for WinRT.

Do you really need those object's though?

MailAddress doesn't really add any value other than allowing you to set a Display Name along with the email address. The header for a Email with a Display Name for "From" looks like:

From: Joe Dirt <joe.dirt@somegmail.com>

You could implement your own MailAddress easily enough if you wanted to, but are you sending emails directly from the device?

ContentType, again these's only a handful of content types you really want to send/receive on a Windows Store App.

json/xml/html, and possibly some media for video/audio. But depending on what you're building, it's unnecessary considering the header value for JSON is application/json or application/json; charset=utf-8 if you want include encoding.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top