What Was I Thinking?

Follies & Foils of .NET Development
posts - 86 , comments - 254 , trackbacks - 0

April 2011 Entries

QuickTip: Determine if Type implements IEnumerable<T>
I was working on a project that required a determination if the type was an IEnumerable collection of some type. Using a bit of reflection and the handy-dandy GetGenericTypeDefinition method, I arrive at this: Code Snippet public static bool IsIEnumerableOfT(Type type) { return type.GetInterfaces().Any(t => t.IsGenericType && t.GetGenericTypeDefinition() == typeof (IEnumerable<>)) ; } Happy Coding ......

Posted On Thursday, April 28, 2011 8:26 AM | Comments (10) |

Reorder Your Accounts in Thunderbird
Ever wanted to re-order your Thunderbird accounts? You can either modify the prefs.js manually 1. Exit Thunderbird if its running. 2. Locate your prefs.js file (default location is c:\users\[your account]AppData\Thunderbird... 3. create a backup , just in case. 4. Open the prefs.js in any text editor and look for: user_pref("mail.accountmana... "account1,account2,account3... line 5. Change the order of the accounts manually 6. Restart Thunderbird OR 1. Download and install ......

Posted On Wednesday, April 20, 2011 11:57 AM | Comments (6) |

Powered by: