9 Apr
2009

Elegant Code Welcomes Brian Lagunas and Corey Schuman

ElegantCode just got a whole lot smarter in the UX department with the addition of Corey and Brian. Both bring a wealth of UX knowledge from RIA Silverlight, WPF, XAML, Game Development, Animation &  Design. Brian wasted no time dropping several posts here on us at ElegantCode, and I?d bet a few bucks there’s a […]

Read More
9 Apr
2009

Conditional Using

Today I found myself writing the following code: private void DoSomething(String userName) { using(var userEntry = GetUserEntryFor(userName)) if(CouldBeFound(userEntry)) { // Do something with userEntry } } private DirectoryEntry GetUserEntryFor(String userName) { // … } private static Boolean CouldBeFound(DirectoryEntry entry) { return null != entry; } Notice the combination of the if statement with the using […]

Read More