lenelex.com
Home
Quizzes
Games
Register
Log in
Question 1 of 15
Does the program below compile?
public abstract class A { public abstract void F(int a); public abstract void F(out int a); }
A. Yes
B. No
Overloading using ref and out
Cannot define overloaded methods that differ only on ref and out. However, methods can be overloaded when one method has a ref or out parameter and the other has a value parameter.
Links:
The [ref] Keyword
The [out] Keyword
Member Overloading