Although this should work logically, unfortunately this does not happen. The CLR still sees your constructor as a parameter-based constructor.
, , # , . - . CLR, " " , :
public Widget(([Optional, DefaultParameterValue("foo")] string name) {
CLR - . CLR , . , DefaultParameterValueAttribute, , .
Edit:
:
, # CLR
# , , , . , , "" ( ), . , , - , , API , , . :
public Widget(
int id = 0,
string name = "foo",
float width=1.0f,
float height=1.0f,
float depth=1.0f
) {
, 120 , N! ...