string text = "19500.36";
decimal value;
if (decimal.TryParse(text, out value))
{
value = Math.Round(value);
text = value.ToString();
// Do something with the new text value
}
else
{
// Tell the user their input is invalid
}
Monday, June 27, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment