Possible Duplicate:
C#: What is the use of “ref” for Reference-type variables?
Hi,
Does it make sense to pass a "reference type" to a method as a parameter with 'ref' key?
Or it is just nonsense as it is already a reference type but not a value type?
Thanks!
It makes sense if you think you might make the variable point to a different object (or to null
) inside your method.
Otherwise, no.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With