询问者
求教,如何通过类型名称获取该类型,而不是该类型对象!

问题
全部回复
-
>> 在不知道其强制转转换的类型的情况下(只有一个类型名称),应该如何进行转型呢?(并不确定是ClassTest,假如用Type.FullName判断的话,在类型很多且不断增加的情况下,会导致很麻烦)
不知道就没法转啊。这种情况下,你应该设计一个继承体系,在声明对象的时候用父类或者接口来声明, 实例化的时候调用子类的构造函数。
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey. -
你能详细解释一下需求吗? 我觉得是不是应该在设计模式上下功夫?
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.