C#MethodInfo getReturnType
-
06-07-2019 - |
質問
MethodInfoのインスタンスを作成しました:
MethodInfo theMethod = typeof(Reciever).GetMethod("methodName", parameterTypes);
今、theMethodの戻り値の型がvoidかどうかを知りたいです。方法は?
解決
簡単:
theMethod.ReturnType == typeof(void)
所属していません StackOverflow