What does the following declaration specify? [code] MethodInfo[] GetMethods()[/code]

What does the following declaration specify?
Code:
 MethodInfo[] GetMethods()
A. Returns an array of MethodInfo objects
B. Returns a list of the public methods supported by the type by using GetMethods()
C. Both Returns an array of MethodInfo objects & Returns a list of the public methods supported by the type by using GetMethods()
D. None of the mentioned
 
Answer: c
Explanation: A list of the public methods supported by the type can be obtained by using GetMethods(). It returns an array of MethodInfo objects that describe the methods supported by the invoking type. MethodInfo is in the System.Reflection namespace.
 

Tìm kiếm

Back
Top