我希望以下内容返回true
:
var isIt = IsDisposable(typeof(TextWriter));
在哪里:
bool IsIDisposable(Type t){
???
// I tried:
//return t.IsSubclassOf(typeof(IDisposable)); //returns false
// the other t.IsXXX methods don't fit the requirement as far as I can tell
}