C # MethodInfo getReturnType
-
06-07-2019 - |
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?
La solution
Facile:
theMethod.ReturnType == typeof(void)
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow