
122
Programming Languages for mis
ere are two types of functions: instance function and static function. Further
discussion on the two types of functions is beyond the scope of this book, and we
study static functions in this chapter. C# has two approaches to parameter passing,
and parameters can be passed either by value or by reference. e default parameter
passing in C# is passing by value. e actual value of the parameter is passed into the
function. Any changes made to the parameter passed into the function will be dis-
carded when the function terminates. e value of the parameter before and after the
function call will be the same. Listi ...