By just adding a simple modification to the existing ReadDataAsync function, we can load text files asynchronously:
You can load files using the following code (don’t forget it is asynchronous.
auto loadTextTask = ReadStringAsync(L"Assets\\Text.txt")
.then([this](Platform::String^ text)
{
m_text = text;
});
Enjoy.
Last updated by at .
Back to top