我想用bindingsource绑定一个自己写的类 就是MyPicture那个类,可是在绑定数据对象的时候看不到这个类,提示(对象位于哪个程序集中,如果您的对象没有出现,请取消该向导,然后重新生成包含对象的项目),请问应该怎么做才能绑定那个类呢? 代码如下:namespace WindowsFormsApplication13_图片浏览器
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
} public class MyPicture
{
private string PicName;
private Image MyPic; public MyPicture(string name, Image image)
{
this.PicName = name;
this.MyPic = image; } public string name
{
get { return this.PicName;}
} public Image image
{
get { return this.MyPic; }
}
}
}
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
} public class MyPicture
{
private string PicName;
private Image MyPic; public MyPicture(string name, Image image)
{
this.PicName = name;
this.MyPic = image; } public string name
{
get { return this.PicName;}
} public Image image
{
get { return this.MyPic; }
}
}
}
加 using 你的命名空间
http://www.mybuffet.cn