摘要:
using System; using System.Collections.Generic; using System.Linq; namespace MyApplication { class Program { static void Main(string[] args) { // 实例化Q 阅读全文
摘要:
《网上转载》 B为一个类,ISay为一个接口。 方法1: B b = new B(); if (b.GetType().GetInterface("ISay") != null) { //如果实现了接口“ISay”,... } 方法2: B b = new B(); if (b is ISay) { 阅读全文