Can someone provide an algorithm that checks if the input string is a decimal number in the correct form and form?
Rules of the correct form and form:
- No more than two decimal places.
- For all practical purposes, the largest number is 99,999,999.99
- The integral part may use a space or a comma or a period to separate groups.
- The decimal part can use a comma or a period for the delimiter.
Examples of the correct shape and shape:
1,234,567.89 // English style
1.234.567.89 // French style
1 234 567.89 // German style
1234567.89 // English mathematical style
1234567.89 // European mathematical style
12.00
12.0
12
, Decimal.Parse Decimal.TryParse. , "1,2,3,4", , .