How can I compare two textboxes in c# using greater than or less than. Im working on billing system. I want the cash shoould be bigger than the total. if not. it will pop up messagebox for error. I already try convert to int. to double. to string. Here's my current code right now.
if (txtCash.TextLength < txtTotal.TextLength){
MessageBox.Show("Cash must me bigger than the total");
txtCash.Focus();
return;
}
Any one can help me how? I know text length is wrong. but im just using it.