c# - Does it make sense to pass a "reference type" to a method as a parameter with 'ref' key? -


possible duplicate:
c#: use of “ref” reference-type variables?

hi,

does make sense pass "reference type" method parameter 'ref' key?

or nonsense reference type not value type?

thanks!

it lets change reference variable itself, in addition object it's pointing to.

it makes sense if think might make variable point different object (or null) inside method.

otherwise, no.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -