How can I check if a user inserted value in a TextBox is a float value as I'm expecting. Thank you.
Printable View
How can I check if a user inserted value in a TextBox is a float value as I'm expecting. Thank you.
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
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);