0

what exactly is the passing by int, ref and out. in a lay man's terms. want to understand it easily

25th Jul 2016, 6:01 AM
Nzoputa Okafor
Nzoputa Okafor - avatar
3 Respuestas
+ 1
Ref = must initalize value before calling the ref method (outside the ref method) Out = must initialize value after calling the ref method (inside the ref method) Its simpler than it actually is, but most article and including this sololearn takes much longer paragraph to explain.
25th Jul 2016, 8:10 PM
awejim
0
int defines an integer variable. ref or for example ref int x defines a reference to an integer variable which is shared with the called method. and out means that the called method will set the values for you. quite simple, just read the tutorial ;-)
25th Jul 2016, 11:14 AM
Yoann Melchior
Yoann Melchior - avatar
0
yeah get it a little thanks
25th Jul 2016, 8:12 PM
Nzoputa Okafor
Nzoputa Okafor - avatar