具有某接口与是某类型

是某类型:

                    if (this.FindName(ControlName).GetType() == typeof(LabelIMG))
                    {
                    }

具有某接口:

                    if (this.FindName(ControlName).GetType().GetInterface("IControl",true) == typeof(IControl))
                    {
                    }

关于作者: 王昕(QQ:475660) 在广州工作生活30余年。十多年开发经验,在Java、即时通讯、NoSQL、BPM、大数据等领域较有经验。
目前维护的开源产品:https://gitee.com/475660
原文地址:https://www.cnblogs.com/starcrm/p/1519422.html