07-24-2023, 11:30 AM
I have a comboBox with all of the months in it.
What I need to know is the number of days in the chosen month.
var month = cmbMonth.SelectedIndex + 1;
DateTime date = Convert.ToDateTime(month);
So if a user selects January, I need to save 31 to a variable.
What I need to know is the number of days in the chosen month.
var month = cmbMonth.SelectedIndex + 1;
DateTime date = Convert.ToDateTime(month);
So if a user selects January, I need to save 31 to a variable.