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