So, I'm working in C#, win forms. I have combobox with numbers from 1 to 10 in it. I am trying to read that integer like this:
int number = int.Parse(comboBox.SelectedText);
and I get error:
Error: Input string was not in the correct format
or if I try to read it like this:
int number = int.Parse(comboBox.GetItemText(comboBox.SelectedItem));
I can read only what is already written(1-10), but if I write by myself some integer, I get same error.
I read with this first method all the time from TextBox
and it is working perfectly fine. Please forgive me, this is my first month with C#