C# Whats the difference between the 'ref' and 'out' keywords
Posted
by TK
on Stack Overflow
See other posts from Stack Overflow
or by TK
Published on 2008-12-23T09:16:43Z
Indexed on
2010/03/15
6:49 UTC
Read the original article
Hit count: 301
I'm creating a function where I need to pass an object so that it can be modified by the function. What is the difference between:
public void myFunction(ref MyClass someClass)
and
public void myFunction(out MyClass someClass)
Which should I use and why?!
© Stack Overflow or respective owner