I assume you mean the user enters a decimal value in a textbox and you convert it to a numeric value:
decimal val;
if (!decimal.TryParse(myTextBox.Text, out val))
{
return;
}
Rounding is also simple: there are a number of overloads you can use to get exactly the result you want:
Math.Round[
^]