Browse by Tags

All Tags » LINQ (RSS)

LINQ and DISTINCT... A Quick Note

A coworker of mine was asking me on how to use get distinct record with LINQ to object. I did a quick spike to test this. I wrote a simple LINQ query over a string array to show him how to do it. var names = new [] { "Unyil" , "Ucok"...
Posted by Jimmy Chandra | 4 comment(s)
Filed under:

Unexpected Method Group Placement

This thing has been around since C# 2.0, but recently, I saw it in unexpected places as a replacement for a Predicate<T> in a parameter. Usually you found it as the right side of an assignment / removal of an event handler such as: //using Method...
Posted by Jimmy Chandra | 2 comment(s)
Filed under: ,

Operation could destabilize the runtime

I was trying to reproduce Repository pattern that Rob Conery was using in his MVC Store Front project in my own project. Continuing with the interface programming style hype, I decided to make everything implement some sort of an interface. So my domain...

Adapter Pattern Case Study: LINQ to SharePoint SPListCollection

While helping my co-worker on a problem we stumbled into a quite interesting thing regarding SharePoint SPListCollection class. SPListCollection, as it turns out, is not derived from IEnumerable interface (see http://msdn2.microsoft.com/en-us/library...
Posted by Jimmy Chandra | 1 comment(s)
Filed under: , ,

Preview of C# version 3.0 features

Wow, C# 2.0 is not officially out of the door, C# 3.0 is already rearing its head :). In this post I'll go through some of the new features of the 3.0 version of C#. Feature 1: Implicitly typed local variables. Variable declaration has become simpler...
Posted by Jimmy Chandra | with no comments
Filed under: , , ,