The DefaultValueAttribute
does not set the property to the value, it is purely informational. The Visual Studio designer will display this value as non-bold and other values as bold (changed), but you'll still have to set the property to the value in the constructor.
The designer will generate code for the property if the value was set by the user, but you can remove that code by right clicking on the property and clicking Reset
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…