新手求助,万分感激!(stream关键字问题)
运行报这个错误:错误 1 找不到类型或命名空间名称“Stream”(是否缺少 using 指令或程序集引用?) F:\CCC\PictrueBox-1\PictrueBox-1\Form1.cs 31 13 PictrueBox-1
程序代码如下:(这个stream建立文件流的操作是缺少命名空间的原因吗?缺少什么命名空间?)
using System;
using System.Collections.Generic;
using
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace PictrueBox_1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void pictureBox1_Click(object sender, EventArgs e)
{
string mypath;
mypath = Application.StartupPath;
pictureBox1.Image = System.Drawing.Image.FromFile(mypath+"\\方克.jpg");
}
private void pictureBox2_Click(object sender, EventArgs e)
{
string mypath;
mypath = Application.StartupPath;
Stream Mystream;
Mystream = (mypath+"\\红心.jpg");
pictureBox2.Image = System.Drawing.Image.FromFile(Mystream);
}
}
}
[ 本帖最后由 tianqy 于 2012-3-19 14:34 编辑 ]