I am struggling how to use “ref” (to pass argument by reference) in real app. I would like to have simple and mainly meaningful example. Everything I found so far could be easily redone with adding return type to the method.
Any idea someone?
Thanks!
I am struggling how to use ref (to pass argument by reference) in real
Share
The best example coming in my mind is a function to Swap two variables values:
Usage:
A function like this one, cannot be done without the
refkeyword.