C# Corner

Related resources for Ref and Out
  • Understanding ref And out With C# 72/20/2017 10:31:10 AM. This article explains the usage of ‘ref’ & ‘out’ in depth along with the enhancement done in C# 7.
  • Understanding ref and out keywords - Language C#1/24/2015 6:24:05 PM. This is a very initial video tutorial showing about ref and out keywords. The ref keyword causes argument passed by reference. The effect is that any changes is made to the parameter in the method will be reflected in that variable when control passes back to the calling method. The out keyword also causes argument to be passed by reference. There is no need to initialize the out variable, as it requires in case of ref variable.Both ref and out are treated differently at runtime, but treated the same at compilation. Therefore, methods can’t be overloaded, if one method takes a ref keyword and the other takes an out argument.
  • Ref and Out (The Inside Story)5/10/2012 1:49:01 AM. Knowing the power of ref and out, a developer will certainly make full use of this feature of parameter passing. My effort in this article would be to make this understanding simpler and focus on internal logic of ref and out.
  • Ref and Out (The Inside Story)11/27/2011 3:10:29 PM. My effort in this article would be to make this understanding simpler and focus on internal logic of ref and out.
  • Facts of Ref And Out Type Parameters in C#6/30/2011 11:27:32 AM. In this quick article you will take a look at the facts of ref and out type parameters in C#.
  • Using ref and out Parameter12/8/2005 1:05:16 AM. When we pass a parameter as ref to a method, the method refers to the same variable and changes made will affect the actual variable.
C# Language Specification 5.0
This book provides a complete description of the C# language 5.0.
Download