C# Programming - Delegates - Discussion

Discussion Forum : Delegates - General Questions (Q.No. 14)
14.
With which of the following can the ref keyword be used?
  1. Static data
  2. Instance data
  3. Static function/subroutine
  4. Instance function/subroutine
1, 2
3, 4
1, 3
2, 4
All of the above
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
2 comments Page 1 of 1.

Gloops said:   1 decade ago
Can please somebody justify why data should not be accessed by reference when a function needs to modify it.

Sridhar said:   7 years ago
No, we can use the ref keyword only instance method, not a static method.

Post your comments here:

Your comments will be displayed after verification.