Visual Studio 2008 Winform designer fails to load Form which inherits from generic class

后端 未结 1 1442
故里飘歌
故里飘歌 2020-12-03 17:35

i have a winforms project, and i created a class on assembly A that inherits from System.Windows.Forms.Form to serve as a base class for variou

相关标签:
1条回答
  • 2020-12-03 18:26

    It's a known limitation. Basically you can work around this by declaring another class that inherits from the generic class.

    For instance:

    class Generic<T> : UserControl
    {
    }
    

    then

    class GenericInt : Generic<int> { }
    

    then use GenericInt instead of Generic. SUcks I know.

    0 讨论(0)
提交回复
热议问题