I’m making a little app for calculating tips for Windows Phone 7 and I want to validate the inputs before trying to calculate things.
How can I check if the textbox has a valid monetary value inserted? No letters and no more than one Dot for decimal places.
The criteria you describe could be checked with a RegEx but it would make more sense to just check with
decimal.TryParse()The NumberStyles and CultureInfo (IFormatprovider) are up for discussion.