直接写using System.IO;就可以了。
如果没有引用System.dll,就手工加上。

解决方案 »

  1.   

    namespace File_Access
    {
            ...
            using System.IO;
    }
    class WinRead:System.Windows.Forms.Form
    {
            ...
    System.IO.StreamReader strm=System.IO.File.OpenText(FILE_NAME);
    //StreamReader strm=File.OpenText(FILE_NAME);提示找不到类型或命名空间名称..
    //是否缺少 using 指令或程序集引用?
    }
    为什么?
    而把
    namespace File_Access
    {
    删除掉就可以了呢?
      

  2.   

    namespace File_Access
    {
            ...
            using System.IO;class WinRead:System.Windows.Forms.Form
    {
            ...
    StreamReader strm=File.OpenText(FILE_NAME);
    }
    }不过还是要设置一下“启动对象”
    打开此项目的“属性页”对话框-》“通用属性”-》 “常规”-》“启动对象”。