Hi
To accept only integer in a textbox (windows forms), i use if (int.TryParse(textBox1.Text, out num) == true) with num as int and for double if (double.TryParse(textBox1.Text, out num) == true) with num as double. But how to accept together an integer and a double number in a textbox?
My solution is to use a double, so int or float or double will be accepted, but the price is that a simple integer will take 8 bytes of memory. Is that acceptable for you?
Thanks