how to know the number and type of parameters?
how to know the return type?
how to check whether the return type is void?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Use
MethodInfo.ReturnTypeto determine the return type, andMethodBase.GetParameters()to find out about the parameters. (MethodInfoderives fromMethodBase, so once you’ve got theMethodInfoviaType.GetMethodetc, you can use bothReturnTypeandGetParameters().)If the method is
void, the return type will betypeof(void):