Asked • 04/02/19

Why are const parameters not allowed in C#?

It looks strange especially for C++ developers. In C++ we used to mark a parameter as `const` in order to be sure that its state will not be changed in the method. But why can't we mark as method parameters const in C#?

1 Expert Answer

By:

Samuel Y. answered • 07/13/20

Tutor
4.7 (25)

Passionate, Results-Driven Software Engineer & Hobby Game Developer

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.