Is there a way to use subclass properties when you only have the baseclass?

后端 未结 0 1822
醉梦人生
醉梦人生 2020-12-12 04:53

So this is what i\'m trying to achieve, is there an elegant way to do this?

public class item
{
}

public class A : item
{
   int a;
}

public class B : item
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题