3

MethodInfoのインスタンスを作成しました。

MethodInfo theMethod = typeof(Reciever).GetMethod("methodName", parameterTypes);

ここで、メソッドの戻りタイプがvoidであるかどうかを知りたいです。どのように?

4

1 に答える 1

11

簡単:

theMethod.ReturnType == typeof(void)
于 2009-06-18T15:41:32.640 に答える