one of my inputs is month so i need the input limited from 1 to 12. This code will of course stop inputs over 12 but not the inputs under 1.
private int dMonth = 1; // Month to go to
[Description("Enter month 1 to 12")]
[GridCategory("Debug goto date")]
[Gui.Design.DisplayName ("Month")]
public int DMonth
{
get { return dMonth; }
set { dMonth = Math.Min(12, value);}
}
Comment