[COLOR=blue]string[/color] text = yourTextBox.Text;
[COLOR=blue]try[/color]
{
[COLOR=blue]double[/color] yourNum = [COLOR=blue]double[/color].Parse(text);
[COLOR=green]// text IS a number ...[/color]
}
[COLOR=blue]catch[/color]
{
[COLOR=green]// text IS NOT a number ...[/color]
}