Question

J'ai créé une instance de MethodInfo:

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

Maintenant, je veux savoir si le type de retour de la méthode est nul. Comment?

Était-ce utile?

La solution

Facile:

theMethod.ReturnType == typeof(void)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top