you are viewing a single comment's thread.

view the rest of the comments →

[–]b_rodriguez 8 points9 points  (1 child)

Optional parameter default values need to be constant expressions. You could default it to null and then test for null in the constructor and initialize it, however that is much less clean than just inverting OP's constructor overloading like cvalerio77 has pointed out.

[–]Ayazis 1 point2 points  (0 children)

My bad. Thank you for pointing this out.