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

int.Parse oddity

$
0
0

A cast is, by definition, changing the type of the object.  tryparse is checking to see if a string contains the specific object in question.  It seemed odd to me that this would work when I first read it, and since David has responded, and I've considered his reply, I would tend to agree.  The docs must be wrong.  You should use double.tryparse if the number could be floating point, then you can cast to int.

 


Viewing all articles
Browse latest Browse all 15

Trending Articles



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