可能重复: C# - "开启类型"有比这更好的选择吗?
C#不支持切换对象的类型.模拟这个的最佳模式是什么:
switch (typeof(MyObj)) case Type1: case Type2: case Type3:
谢谢!
c#
c# ×1