sort a list of different type of objects

后端 未结 4 988
小鲜肉
小鲜肉 2021-01-14 01:57

I have a list of objects which contains different types of objects but a single property is common among all. list contains objects of Field class, Button Class, Page class

4条回答
  •  臣服心动
    2021-01-14 02:37

    All your objects should be exetended or inheritance by some and same super class, then the compiler will not ask you to explicitly change those objects.

提交回复
热议问题