gpt4 book ai didi

c# - 从抽象类继承的用户控件

转载 作者:太空狗 更新时间:2023-10-29 21:51:51 26 4
gpt4 key购买 nike

我有一个继承自抽象类的用户控件。基本上是这样的。

class SimpleSlideView : View
{

}

public abstract class View : UserControl
{

}

项目编译并运行良好。我可以将 usercontrol(从工具箱中)拖到窗体中,然后在设计器中正确显示。但是,如果我尝试在设计器中打开 SimpleSlideView 控件本身,我会收到以下错误:

The designer must create an instance of type 'Animation.View' but it cannot because the type is declared as abstract.

我错过了什么?

最佳答案

关于c# - 从抽象类继承的用户控件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6241548/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com