First, convert the user input to a number:
double userInput;
if (!double.TryParse(myTextBox.Text, out userInput))
{
...
return;
}
Then pass the value as a parameter, just like you are, but using userInput instead of the text box content.
[edit]One line was outside the code block.[/edit]