I was curious if there is a .TryParse() method in the Compact Framework? If not, is there any standardized method I should be handling string to numeric conversion? I mean, I know I can do this:
...but I've never been keen on handling functions with exceptions.Code:Private Overloads Function TryParse(ByVal s As String, ByRef i As Integer) As Boolean Try i = Convert.ToInt32(s) Return True Catch ex As Exception Return False End Try End Function Private Overloads Function TryParse(ByVal s As String, ByRef d As Decimal) As Boolean Try d = Convert.ToDecimal(s) Return True Catch ex As Exception Return False End Try End Function
Thanks.




the people who helped you and mark your forum RESOLVED when you're done! 
Reply With Quote