Friday, July 24, 2009

Types of parameters in C#

There are 4 types of parameter passing in C#:
1) Value: pass by value.
2) Out: like pointer in C/C++, allow return value. Don't have to be initialized first.
3) Ref: like reference in C++, allow return value. Must be initialized first.
4) Params: for variable length parameter list.

More detailed explanation and examples:
http://www.csharphelp.com/archives/archive225.html

No comments:

Blog Archive

Followers