An example of what you can do with LINQ(code snippets):
SortedDictionary<int, Customer> customers = new SortedDictionary<int,Customer>
{
{1,new Customer{Name="John",Age=13,Gender="M"}},
{2,new Customer{Name="Mary",Age=25,Gender="F"}},
{3,new Customer{Name="Jennifer",Age=27,Gender="F"}},
{4,new Customer{Name="Johnathan",Age=35,Gender="M"}},
{5,new Customer{Name="Catrine",Age=23,Gender="F"}},
{6,new Customer{Name="Henry",Age=30,Gender="M"}},
{7,new Customer{Name="Heny",Age=29,Gender="F"}}
};
var q = from s in customers
where s.Value.Age < 25 && s.Value.Gender=="F"
select s;
foreach(var t in q)
{
Console.WriteLine(t.Value.Name); // "Catrine"
}
Console.ReadLine();
//Customer class
class Customer
{
public string Name { get; set; }
public int Age { get; set; }
public string Gender { get; set; }
}
The above example basically use LINQ to filter out items in SortedDictionary based on age (<25) and gender("female").
I hope this forum will kick-start LINQ discussions..