Exercises in .NET with Andras Nemes
There are a lot of number formats out there depending on the industry we’re looking at. E.g. negative numbers can be represented in several different ways:
- -14
- (14)
- 14-
- 14.00-
- (14,00)
…and so on. Accounting, finance and other, highly “numeric” fields will have their own standards to represent numbers. Your application may need to parse all these strings and convert them into proper numeric values. The static Parse method of the numeric classes, like int, double, decimal all accept a NumberStyles enumeration. This enumeration is located in the System.Globalization namespace.
View original post 168 more words