TheChaseMan's Frenetic SoapBox

Always looking for better ways to do things...

TryXxxx() Methods

I am really enjoying these TryX() methods in .NET 2.0, it is such a nice pattern. It's the little things that sometimes make my day.  :-)

Dictionary<int, int> d = new Dictionary<int, int>();

 

int result;

bool op = d.TryGetValue(1, out result);

 

op = Int32.TryParse("1", out result);


Digg!

posted on Sunday, October 30, 2005 10:28 AM

Feedback

No comments posted yet.