Category: <span>LINQ</span>

Using LINQ to elegantly initialize arrays

**CORRECTED 8/26/08: Apparently my initial code did not work correctly.  This appears to be a widespread mistake, as I found about a dozen other people doing the exact thing I was doing with reference types.  Corrected code and the non-working example are below.** I am tired of writing array initialization code that looks like this:…

Read More

Using LINQ with ActiveRecord

One of the new projects at my day job is using ActiveRecord for data access.  I’m a huge fan of ActiveRecord (and of all things Castle), but I like the fact that LINQ makes it very easy to do ad-hoc queries with a compile-time safety net.  Unfortunately, ActiveRecord does not support LINQ out of the…

Read MoreView 5 Comments