سؤال

If I have some readable data/bytes stored within a Windows::Storage::Streams::Buffer object - what would be the best way to convert this into a Platform::String so that I can pass it to another API?

Is using the static method DataReader::FromBuffer and then using LoadAsync the way to go?

هل كانت مفيدة؟

المحلول

The documentation shows that CrytographicBuffer is one of the more useful concrete types that can be used for stream I/O, and it has functions for conversion to/from strings.

Examples here on MSDN

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top