Windows Forms - customizing NumericUpDown to be nullable
问题 I found this custom class that allows NumericUpDown to receive nullable values. I use it in an edit form which can be empty or could be populated with a data from a database from where the need for nullable values comes from. This is the current code : public partial class NullableNumericUpDown : NumericUpDown { public NullableNumericUpDown() { InitializeComponent(); } public NullableNumericUpDown(IContainer container) { container.Add(this); InitializeComponent(); } private int? _value;