C # MethodInfo getReturnType
-
06-07-2019 - |
Domanda
Ho creato un'istanza di MethodInfo:
MethodInfo theMethod = typeof(Reciever).GetMethod("methodName", parameterTypes);
Ora voglio sapere se il tipo restituito dal metodo è nullo. Come?
Soluzione
Facile:
theMethod.ReturnType == typeof(void)
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow