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.

Sizin İçin Seçtik  Where can I learn C++ for beginners?

Leave a Reply

Your email address will not be published. Required fields are marked *

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.

Sizin İçin Seçtik  Tekstilciler ne kadar maaş alıyor?

Leave a Reply

Your email address will not be published. Required fields are marked *