3 ms·
I'm pretty sure one of the biggest differences between C# and Java is that in C# you can't assume everything is a reference. A strict is passed by value.
by raincole 3y ago
I'm pretty sure one of the biggest differences between C# and Java is that in C# you can't assume everything is a reference. A strict is passed by value.
- fluoridation 3y agoNo, strings are passed by reference, it's just that the string type is immutable. Passing a string to a function doesn't create a copy, but there's also no way for the callee to modify the object that the caller points to. It is true that C# has value types that are by default passed by copy, though.
- raincole 3y agoI mistyped struct as strict.