阅读背景:

给定一个Object,我如何以编程方式告诉它支持哪些接口?

来源:互联网 

Given this:

Interface IBase {string X {get;set;}}
Interface ISuper {string Y {get;set;}}

class Base : IBase {etc...}
class Super : Base, ISuper {etc...}

void Questionable (Base b) {
  Console.WriteLine ("The class supports the following interfaces... ")
  // The Magic Happens Here
}
Interface IBase {string X {get;se



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: