title: ref vs out parameters in C#
body: <p>I have read many articles related to ref and out parameters and they helped me to understand the basic concept of these parameters but none of these make me clear about where we have to use ref and where we have to use out. </p>
  
  <p>It would be really appreciated if someone can give me an example that shows a scenario where we can use ref parameter to achieve a functionality that can not be achieved by using out parameter and vice verse.</p>
  
  <p>i know the difference between ref and out parameters.</p>
  
  <p>Ref: I know that we always need to initialize a variable before passed it as ref in a method.</p>
  
  <p>Out: I know that we always need to set value of a variable as out parameter in the calling function before it returns a value.</p>
  
  <p>Is there any example exists in which i can use ref parameter but not out and vice verse ?</p>