>>I suggest to use TryParse. See >> >>http://www.dreamincode.net/forums/blog/1693/entry-3714-got-the-net-casting-blues-tryparse-is-here-to-save-the-day/ > >Ok, this is good to know. > >But, in my case, all the validation is already done that the value of the variable declared Double is one that fits for a value in the variable Integer. So, as is, the result would then be the same as using the TryParse as I did basically same thing in the code prior to that line.
I think it's always better to be explicit. In your case you will reply on implicit cast.