double.TryParse(txtdisc.Text, out b);
double b; bool IsDoubleValue = double.TryParse(textBox1.Text, out b); //do whatever you want with this value var doubleTypeValue = IsDoubleValue ? Convert.ToDouble(textBox1.Text) : 0;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)