未能找到类型或命名空间名称“streamwriter"

novlegend 2013-07-25 06:40:37
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace menuhistory001
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void 打开ToolStripMenuItem1_Click(object sender, EventArgs e)
{
openFileDialog1.FileName = "";
this.openFileDialog1.ShowDialog();
streamwriter s = new streamwriter( "\\Menu.ini", true);

}
网上说加上using System.IO;
就可以了,可是我加上之后还是报错,再右边添加引用那里找不到system.IO.
刚开始学C#求解释的详细一点,谢谢。
...全文
353 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
novlegend 2013-07-25
  • 打赏
  • 举报
回复
果然,谢了。 哎,写SQL不区分大小写习惯了。。。
yyantifa 2013-07-25
  • 打赏
  • 举报
回复
streamwriter 注意大小写..

110,529

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧