2009-06-18 5 views
3

Je créé une instance de MethodInfo:C# MethodInfo getReturnType

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

Maintenant, je veux savoir si le type de retour de theMethod est vide. Comment?

Répondre

11

Facile:

theMethod.ReturnType == typeof(void) 
Questions connexes