怎么设置项值

Lisen_1987 Lisen_1987 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
这两天刚开始接触组件开发,我随便弄了一个,如下代码:

public class ClassTool : Component
{
private IContainer components = null;

public void Dispose()
{
if (Disposed != null)
Disposed(this, EventArgs.Empty);

}
public event EventHandler Disposed;

private ISite m_curISBNSite;
public ISite Site
{
get
{
return m_curISBNSite;
}
set
{
m_curISBNSite = value;
}
}

private string value1 = string.Empty;

public string Value1
{
get
{
return value1;
}
set
{
value1 = value;
}
}

private List<item> itm = null;

public List<item> Itm
{
get
{
return itm;
}
set
{
itm = value;
}
}

}

public class item
{
private string itemA;
public string ItemA
{
get
{
return itemA;
}
set
{
itemA = value;
}
}

private string itemB;

public string ItemB
{
get
{
return itemB;
}
set
{
itemB = value;
}
}

private string itemC;

public string ItemC
{
get
{
return itemC;
}
set
{
itemC = value;
}
}
}


编译的时候components,Dispose(),Disposed,Site都提示隐藏了继承的成员,但是我不明白这是什么意思?还有,我在另一个项目中引用这个组件,里面有个属性类item,我设置里面的项值itemA,B,C,但是设置之后在Designer.cs文件代码中没有生成对应的代码,请问这个要怎么弄?
...全文
评论 3
收藏 已收藏
分享
返回顶部
Lisen_1987
组件/控件开发 8,830 成员 7,151 内容