C#MethodInfo getReturnType
-
06-07-2019 - |
题
我创建了一个MethodInfo的实例:
MethodInfo theMethod = typeof(Reciever).GetMethod("methodName", parameterTypes);
现在我想知道theMethod的返回类型是否为void。怎么样?
解决方案
易:
theMethod.ReturnType == typeof(void)
不隶属于 StackOverflow