///
/// Determines whether [is valid decimal] [the specified temp].
///
/// The temp.
///
///
///
public static bool IsValidDecimal(string temp)
{
bool isValidCurrency = true;
Regex regularExp = new Regex(@"^\d{0,9}(\.\d{1,2})?$");
if (!regularExp.IsMatch(temp))
{
isValidCurrency = false;
}
return isValidCurrency;
}
No comments:
Post a Comment