+ 1
What is the difference between ref and out?
2 Réponses
+ 3
Hello, Fabian Prymus !
"ref" tells the compiler that the object is initialized before entering the function, and "out" tells the compiler that the object will be initialized inside the function.
So, while "ref" is two-sided, "out" is not available.
https://www.sololearn.com/Course/CSharp/?ref=app
0
Thanks!