标签: c# .net reflection void methodinfo
我创建了一个MethodInfo的实例:
MethodInfo theMethod = typeof(Reciever).GetMethod("methodName", parameterTypes);
现在我想知道theMethod的返回类型是否为void。怎么样?
答案 0 :(得分:11)
易:
theMethod.ReturnType == typeof(void)