+ 1

What is the difference between ref and out?

11th Jul 2018, 6:50 PM
Fabian Prymus
Fabian Prymus - avatar
2 odpowiedzi
+ 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
11th Jul 2018, 7:03 PM
Alexander Sokolov
Alexander Sokolov - avatar
0
Thanks!
11th Jul 2018, 7:04 PM
Fabian Prymus
Fabian Prymus - avatar