在VS C#Express中,我得到运行下面的代码时,这个错误(在类中添加一个即使):C#VS错误:类不包含构造
'myComponent.SettingsComponentAttributes' does not contain a constructor that takes 1 arguments.
我曾尝试加入构造函数的类本身,而是应用到新的构造相同的消息:
public override void CreateAttributes()
{
m_attributes = new SettingsComponentAttributes(this);
}
public SettingsComponentAttributes(SettingsComponentAttributes obj)
{
}
您必须创建一个带有1个参数的构造函数。 – CodeCaster 2012-07-24 09:42:35