Question discussion

In C#, which keyword passes an argument by reference without requiring the variable to be initialised before the call?

1516Medium DSSSB TGT Computer Science 0 replies 1 views
0

In C#, which keyword passes an argument by reference without requiring the variable to be initialised before the call?

  • Aref
  • Bout
  • Cin
  • Dparams
Correct answer: B

Explanation

An out argument must be assigned inside the method, so the caller need not initialise it, whereas ref requires prior initialisation.

Discussion 0

Nobody has replied yet. Start the discussion!