Why won't this simple subtraction work?
int MyPageNumber = Convert.ToInt32(cboPageNumber.SelectedItem);
MyPageNumber += (MyPageNumber - 1); //does not work
int MyNewPageNumber = MyPageNumber - 1; /works
I was also hoping someone could tell me why this gives me a "red line" for not being able to do a cast:
short MyPageNumber = Convert.ToInt16(cboPageNumber.SelectedItem);
MyPageNumber += MyPageNumber - ((short) 1); //does not work says can't cast
What am I not understanding? Is the + turning it into a String in the examples?
Thank you.