【发布时间】:2014-11-06 20:27:34
【问题描述】:
我有一个适用于我的 Windows 8 应用程序的 StorageFiles 列表。我需要通过 Stream 类将它们提交到服务器。我试过像这样转换存储文件:
Stream fs = temp[i].OpenAsync(FileAccessMode.Read);
temp[] 是包含图像的 StorageFiles 列表。显然我的代码不起作用。该错误消息表明我可能缺少演员表或其他内容。无论如何将 StorageFiles 或 IAsyncOperation 转换为流?
【问题讨论】:
-
您收到的错误信息是什么?
-
你需要
await它。 -
await 对它没有任何作用。这是错误消息:无法将类型“Windows.Foundation.IAsyncOperation
”隐式转换为“System.IO.Stream”。存在显式转换(您是否缺少演员表?) -
也许它不起作用,因为它在你的
STEAM中吹掉了太多System.IO.Steam
标签: c# windows windows-8 stream windows-8.1