a parameter they are passed by reference, so it happens on C # too or is it necessary to use the keyword ref?
It's the same for both of C# and Java
Actually ref is used when you want to pass a primitive data type like an int, by reference
There are other use cases by the way, imagine you want to pass a reference by reference! That's where you use ref with a non-primitive (e.g. a class instance)
Обсуждают сегодня