1.

What Is The Difference Between Int.parse And Int.tryparse Methods?

Answer»

Parse method throws an EXCEPTION if the string you are trying to parse is not a valid number where as TryParse returns false and does not throw an exception if PARSING FAILS. Hence TryParse is more EFFICIENT than Parse.

Parse method throws an exception if the string you are trying to parse is not a valid number where as TryParse returns false and does not throw an exception if parsing fails. Hence TryParse is more efficient than Parse.



Discussion

No Comment Found