There are 4 entries for the tag LINQ
Member.Of – Avoiding hard-coded strings for property names

In the hallways of building 42, several of us have talked about how often we need to hard-code member names as strings in code, but we always feel like there should be some language operator to do this.  We’ve specifically said there should be a memberof() in C# the same way there’s a typeof() operator. I got tired of waiting for it though, and decided to see how closely I could come to creating this behavior.  What sparked it was my usage of NHibernate’s Restrictions class tonight.  I was looking at a post on Ayende’s blog showing examples of...

posted @ Saturday, April 10, 2010 3:32 AM | Feedback (8)

Accept Except, Except - Thumbnail creator fun with Linq

It is time to write a new version of my application to pull photos off a memory stick and organize them as I like them to be.  Our current version was a quick hack to get something working when we got our digital camera a couple of years ago.  It was hacked over and over, and it ended up being very tightly bound to a certain use case.  Our use case has now changed since we have a Windows Home Server.  It's time for a more robust solution that will survive future process changes. I got to the ThumbnailCreator...

posted @ Sunday, August 10, 2008 3:05 AM | Feedback (0)

Starting to get LINQ

I’m finding that I’m using LINQ more and more for simple problems that would otherwise have longwinded solutions.  The brevity that LINQ offers is pretty powerful, and I appreciate that LINQ allows me to express what I want clearly and get the desired result. One example today was when working with a custom calendar control that has a list of selected Days.  A Day is also a custom control, and it has a Date property.  I wanted to convert the list of selected Day controls into a list of selected dates....

posted @ Wednesday, July 2, 2008 5:01 PM | Feedback (0)

I don't like magic anymore

Growing up, I always liked magic.  I actually spent a significant portion of my childhood earnings at a local magic shop in Milford, Ohio.  I remember vying for the really fancy tricks, but I always had to settle for the simpler, cheaper tricks.  I have always been excited to see magic performed and try to figure out how it might be done.  When The Illusionist came out on DVD, I watched and loved it.  Then I saw The Prestige, which blew The Illusionist away.  (If you haven't seen The Prestige, go add it to your Netflix list right now, it's...

posted @ Monday, June 2, 2008 10:14 PM | Feedback (1)