Example implementation of 'TryParse' or 'TryGetValue'

Viewed 26131

Can you give me an example of implementation of .NET 'try' pattern?

Edit:

I don't mean a "try-catch" statement, I mean a try patterns, like those used in TryParse(), and TryGetObjectByKey() methods.

Most specifically what to do with raised exceptions in custom 'try' pattern methods. Should I log it, should I ignore It. Does' anybody know what is the practice with those methods?

3 Answers
Related