You can use optional parameters in Methods, Constructors, Indexers, and Delegates . Each and every optional parameter contains a default value which is the part of its definition. If we do not pass any parameter to the optional arguments, then it takes its default value.
Can we use optional parameters in a constructor?
You can use optional parameters in Methods, Constructors, Indexers, and Delegates . Each and every optional parameter contains a default value which is the part of its definition. If we do not pass any parameter to the optional arguments, then it takes its default value.