FAQ
What is the difference between a parameter and argument? A parameter is part of the signature An argument is part of the method call What is a named argument and when should it be used? A named argument uses the parameter name when calling the method. Used to clarify the purpose of an argument and define arguments without concern for their position in the parameter list. How is optional parameter defined? In the method signature, we define a parameter as optional by specifying a default value. What is the difference between passing an argument by value vs by reference? When passed by value , which is the default, the value of the argument is passed to the method. When passed by reference using ref or out, the variable is effectively passed to the method. Because of this, passing by reference enable the method to change the value of the parameter and have that change reflected in the calling code. What is the difference between ref and out ? ...