Method Parameters (C# Reference)
Visual Studio 2010
If a parameter is declared for a method without ref or out, the parameter can have a value associated with it. That value can be changed in the method, but the changed value will not be retained when control passes back to the calling procedure. By using a method parameter keyword, you can change this behavior.
This section describes the keywords you can use when declaring method parameters:
Changes in parameters
The value of a parameter can be changed in the method, but the changed value will not be retained when control passes back to the calling procedure, unless the parameter is a reference type, e.g. object, string, array, etc. They do not need to be declared with ref or out, to be changed by the methods.
- 2/25/2012
- ZdravkoGenov
- 2/25/2012
- ZdravkoGenov