0

What does ref keyword stands for?

12th Sep 2016, 8:02 PM
RTom
RTom - avatar
2 Antworten
+ 2
ref is short for "reference" it just implies that changes to that variable in the scope of the method will also effect the value of the argument in the scope the method was called from. Pass by value is the default in which case you only get the value instead of a reference to the arguments.
22nd Sep 2016, 11:13 AM
Shrideep Chougule
Shrideep Chougule - avatar
+ 1
in short, in pass by ref the passed parameter holds the same memory location as it was in main function.
18th Oct 2016, 5:08 PM
Rachna Singh
Rachna Singh - avatar