Top
item
Advertisement
image credit: Unsplash

How to use named and optional parameters in C#

September 21, 2020

Microsoft introduced support for named and optional parameters in C# 4.0. While a named parameter is used to specify an argument based on the name of the argument and not the position, an optional parameter can be used to omit one or more parameters in the method signature. The parameters of a method can be either required or optional depending on whether or not you need to pass a value to these parameters when the method is called.

Read More on Info World