C# StreamReader丢失了吗?

C# StreamReader丢失了吗?,c#,visual-studio,streamreader,C#,Visual Studio,Streamreader,我能做些什么来修改这个吗 using namespace指令只能应用于名称空间; “System.IO.StreamReader”是一个类型,而不是命名空间 查看“添加引用”,StreamReader在可供选择的选项列表中不可用 using System.IO; using System.IO.StreamReader; 你在尝试新的C#6功能吗?在以前的C#版本中,使用是为名称空间保留的。它是C#,而不是Java:允许使用System.IO,而允许使用System.IO.StreamRead

我能做些什么来修改这个吗

using namespace指令只能应用于名称空间; “System.IO.StreamReader”是一个类型,而不是命名空间

查看“添加引用”,StreamReader在可供选择的选项列表中不可用

using System.IO;
using System.IO.StreamReader;

你在尝试新的C#6功能吗?在以前的C#版本中,使用是为名称空间保留的。它是C#,而不是Java:
允许使用System.IO
,而
允许使用System.IO.StreamReader
not@GrantWinney它在C#6;中有效)您可以让VS为您管理使用:右键单击红色下划线的代码->解决->使用。。。(仅当引用了程序集时才有效)
using System.IO;
//THATS TOO MUCH : using System.IO.StreamReader;