首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

请教这控件是什么错呢:The designer must create an instance of type 'AUserControl' but it ca

2012-01-22 
请问这控件是什么错呢:The designer must create an instance of type AUserControl but it cannot beca

请问这控件是什么错呢:The designer must create an instance of type 'AUserControl' but it cannot because the type is declared as abstract.

各位好.我现在是定义一个UserControl的AUserControl,然后再定义一个UserControl的BUserControl,BUserControl继承AUserControl,其中定义如下:

public abstract partial class AUserControl : UserControl
{
}

public partial class BUserControl: AUserControl 
{
}

但是当我要打开BUserControl进行编辑的时候,却不能打开.然后报错提示:
The designer must create an instance of type 'AUserControl' but it cannot because the type is declared as abstract.

请高人给予指教.
先谢谢了!

急等中...

[解决办法]
AUserControl 是抽象类,编译器无法将其实例化啊。

[解决办法]
意思是:
设计器必须创建类型“LockApp.AUserControl”的实例,但该类型已声明为抽象,因此设计器无法创建该类型的实例。

热点排行