Im new to programming and I dont know very much about but I\'m making a calculator, and i want to use a textbox that only acepts numbers and decimals, and when the user past
if ("1234567890".IndexOf(e.KeyChar.ToString()) > 0) { e.Handled = false; } else { e.Handled = true; }