What does the following C# code specify? [code]object Invoke(object obj, object[] parameters)[/code]

Nguyễn Trà

New member
What does the following C# code specify?
Code:
object Invoke(object obj, object[] parameters)
A. Calling a type using invoke()
B. Any arguments that need to be passed to the method are specified in the array parameters
C. The value returned by the invoked method is returned by Invoke()
D. All of the mentioned
 
Answer: d
Explanation: Here, obj is a reference to the object on which the method is invoked. (For static methods, you can pass null to obj.) Any arguments that need to be passed to the method are specified in the array parameters. If no arguments are needed, parameters must be null. Also, parameters must contain exactly the same number of elements as the number of arguments.
 

Tìm kiếm

Back
Top