#39;System.IO.Stream#39; does not contain a definition for #39;Close#39; in Windows Store Apps(“System.IO.Stream不包含 Windows 应用商店应用程序中“关闭的定义)
问题描述
当尝试在 Windows Store Apps 上构建我的 Unity 3D 项目时,出现此错误
When try to build my Unity 3D project on Windows Store Apps, this error occurs
System.IO.Stream' 不包含Close"的定义,并且找不到接受System.IO.Stream"类型的第一个参数的扩展方法Close"
System.IO.Stream' does not contain a definition for 'Close' and no extension method 'Close' accepting a first argument of type 'System.IO.Stream' could be found
如何在 Windows 8 中使用 Streams?
How can I use Streams in Windows 8?
推荐答案
您收到该错误是因为 Windows 应用商店应用不支持 Stream.Close.
You get that error because there is no support for Stream.Close on Windows Store Apps.
如 .Net for Windows Store 应用概览页面
托管类型和成员子集的设计明确侧重于 Windows 应用商店应用开发.因此,它省略了以下内容:
The subset of managed types and members was designed with a clear focus on Windows Store app development. As a result, it omits the following:
[...]
- 导致混淆的成员(例如 I/O 类型的 Close 方法).
您必须将其替换为 Dispose() 或使用 using 语句.
You will have to replace that with a Dispose() or by using a using statement.
这篇关于“System.IO.Stream"不包含 Windows 应用商店应用程序中“关闭"的定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:“System.IO.Stream"不包含 Windows 应用商店应用程序中“关闭"的定义
基础教程推荐
- C# 从 List<List<int>> 中删除重 2022-01-01
- 当值可以是对象或空数组时反序列化 JSON 2022-01-01
- 我应该在后面的代码中直接使用 Linq To SQL 还是使 2022-01-01
- Azure Functions:CosmosDBTrigger 未在 Visual Studio 中触发 2022-01-01
- 如何使用 .Net 检查 Active Directory 服务器是否已启动并正在运行? 2022-01-01
- 禁止输入少量字符,例如'<'、'&a 2022-01-01
- WPF 模态进度窗口 2022-01-01
- .NET SerialPort DataReceived 事件未触发 2022-01-01
- Moq It.Is<>不匹配 2022-01-01
- 如果有人提交恶意软件Nuget包怎么办? 2022-01-01
