How can I check if a user inserted value in a TextBox is a float value as I'm expecting. Thank you.
How can I check if a user inserted value in a TextBox is a float value as I'm expecting. Thank you.
* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.
Thank for your replys. I'm programming in C++. The IDE is M. Visual Studio .NET 2008
Joelito, do you suggest me to parse all the text inside the textbox and check if each character is a digit or the decimal character ("." or "," - depending on my Windows configurations)? I could only accept one decimal character. There is no other solution? Thanks. Joao
All problems in computer science can be solved by another level of indirection,
except for the problem of too many layers of indirection.
– David J. Wheeler
My IDE is Microsoft Visual Studio .NET and I'm programming in C++.
I have solved my problem, as you can see below:
Code:using namespace System; bool good_parsing = Double::TryParse(TextBox->Text, my_double_result_value);