1

请参阅下面的代码,如何将 IsolatedStorageFileStream-obj 转移到 IInputStream-obj?谢谢!

using(IsolatedStorageFileStream stream = 
   IsolatedStorageFile.GetUserStoreForApplication().OpenFile(".."), FileMode.Open))
{
    await storedContact.SetDisplayPictureAsync(stream); // compile error
}
4

1 回答 1

0

在 WP8 上:

using System.IO;

using(IsolatedStorageFileStream stream = IsolatedStorageFile.GetUserStoreForApplication().OpenFile("..", FileMode.Open))
    await storedContact.SetDisplayPictureAsync(stream.AsInputStream());
于 2013-07-31T13:06:16.093 回答