public static Type GetReturnType(this MethodBase mi) { return (mi.IsConstructor) ? mi.DeclaringType : ((MethodInfo)mi).ReturnType; }