c#.net

c#.net 숫자인지 판단

우유빛 2010. 8. 24. 16:48

public static bool IsNumeric(string txt)
{
    string str = txt.Trim();
    if (!Regex.IsMatch(txt.Trim(), "^([0-9,-])"))
    {
        return false;
    }
    return true;
}