Quantcast
Channel: int.Parse oddity
Viewing all articles
Browse latest Browse all 15

int.Parse oddity

$
0
0

Integers don't have a fractional part. It's entirely understandable (and correct, IMHO) that the int.Parse method does not allow a decimal point in the textual representation of an integer. However, it should throw a FormatException, not an OverflowException.

The OverflowException seems to be specific to the Currency NumberStyle, as most other variations do throw the correct exception.


Viewing all articles
Browse latest Browse all 15

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>