Why is there an out keyword for arguments when there is already ref?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/388464/c-whats-the-difference-between-the-ref-and-out-keywords">C# Whats the difference between the &#39;ref&#39; and &#39;out&#39; keywords</a>  </p>
</blockquote>



<p>I am a C++ programmer refreshing my knowledge on C# - it is proving to be a mindf*** at times.</p>

<p>I cannot see the point of an out parameter, when the ref keyword already allows one to directly manipulate the passed in variable rather than a (presumably stack allocated) copy?</p>

<p>The implementors of the language are smarter than I am. Ergo, there must be a reason why the out keyword exists. However, I cannot fathom why it would be needed. Is it superfluous or is it really useful in some scenarios? (which scenarios?).</p>

<p>On the subject of passing by ref, I also don't understand the imposed restriction of the variable being non-const. It seems like an unnecessary imposition - if you have a heavy const object (say a massive hashtable) that you want to pass to a function. There must be a reason for this (unless its too much "hand holding" to prevent newbies from shooting themselves in the foot).</p>

<p>Can someone shed some light on why this restriction exists?</p>
