0
what exactly is the passing by int, ref and out. in a lay man's terms. want to understand it easily
3 odpowiedzi
+ 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.
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 ;-)
0
yeah get it a little thanks