Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
9
Answers
Regular Exp
Priya M
8y
460
1
Reply
hi,
I want accept decimal no eg1023.56, 59.00,1566.36
decimal point is allow for only one time
public static bool validdecimal(string text)
{
Regex regex = new Regex("^\d*\.?((25)|(50)|(5)|(75)|(0)|(00))?$");////Not work
return !regex.IsMatch(text);
}
on call
e.Handled = !ClassValidation.Validdecimal(e.Text);
Post
Reset
Cancel
Answers (
9
)
Next Recommended Forum
how to define static resource for background color of wpf?
TreeView with CheckBox