I am taking numerical input from a text box. I want to check
if(textBox1.Text.Contains("."))
like 55.37
then split the string in two parts/strings.
Use this:
string[] ret = textBox1.Text.Split('.');
Then you can do
if (ret.Length != 2) // error ?!?
ret[0] is integer part
ret[1] is fractional part
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With