What Is Named Arguments In C#
Named Arguments Generally, In Methods call, Arguments are passed according to the order of parameters defined in the method definition. So when making a method call, it is necessary for us to remember the order of parameters before passing the value to the method call. If the number of parameters is large then it is difficult to remember the order. To overcome this, Named arguments are used. When calling a method, arguments are passed with the parameter name followed by a colon and a value. In Named Arguments, we do not require to pass the parameters in order as defined on method definition, so we can pass the arguments in any order on method calling.