blog community

Welcome to blog community Sign in | Join | Help
in Search

Browse by Tags

All Tags » .NET » Linq
  • Selecting or filtering on the sequence number in Linq

    A few weeks ago I was writing a Linq query where I needed each items sequence number (or index) as a part of the filter expression in a Where operation. To simplify the actual problem let's say I needed to filter out only the odd items. One (wrong) way to do this would be: int i = 0; var filtered = input.Where(x => i++ % 2 == 1); This ...
    Posted to Frank Bakker (Weblog) by frankb on November 23, 2008
  • Adding sets of items to arbitrary collections using extensions methods

    Don't you just hate the fact that only some collection classes provide a possibility too add more than one item at once (such as List<T> does offer via AddRange). This means that often I'm writing this kind of code:var q = <some cool linq query>; foreach(var i in q) {    someCollection.Add(i); }So I decided to ...
    Posted to Raimond Brookman (Weblog) by Raimondb on April 7, 2008
  • Using Lambda statement blocks with LINQ May CTP

    The new LINQ CTP also support lamba statement block, instead of only expressions. Still only expressions are compilable to expression treeds though (hence the name *expression* trees..) Anyway, this offers the opportunity to do away with anonymous method syntax. See the sample below: no more explicit typing of your parameter, it will be ...
    Posted to Raimond Brookman (Weblog) by Raimondb on June 23, 2006
  • Restoring Smart Tags in the C# IDE after installing LINQ Preview May 2006

    When you have installed the latest LINQ preview and have installed the Language Service, you wil notice that all of a sudden all the smart tags and refactoring commands stop working. The first time I solved this by reinstalling VS (somewhat harsh and time consuming :-)) It turns out that you also kan have both LINQ and smart tags by fixing a ...
    Posted to Raimond Brookman (Weblog) by Raimondb on June 14, 2006
  • Info Support IT Seminar WinFx Slides

    Recently I did a talk about WinFx for a group of students that were attending our IT Seminar. I this seminar we highlighted topics on both the Java and the .NET side of the world. My talk was about WinFx, presenting an overview of all the new Technologies that will be available somewhere at the end of the year. Anyway here are ...
    Posted to Raimond Brookman (Weblog) by Raimondb on April 25, 2006
  • DevDays 2006 Slides & Demos

    We have a saying in holland, and it's “better late than never” and boy does this apply here. I promised to put the samples and slides of my talk at the DevDays online. I've been having some difficulties with my ftp site, but now it's all working again. So I decided to put it online after all. Here they are:C# 3.0 & ...
    Posted to Raimond Brookman (Weblog) by Raimondb on April 25, 2006
  • Speaking at Devdays 2006 : C# 3.0 and Linq

    As you might already have noticed, I'll be speaking at DevDays 2006. I will be doing a talk on LINQ and the underlying features that have been added to C# 3.0 to make this programming paradigm possible. If you are interested on some info up-front, read the article I wrote during the PDC on this topic. The full set of sessions can be ...
    Posted to Raimond Brookman (Weblog) by Raimondb on February 2, 2006
  • LINQ Preview updated to VS2005 RTM

    If you are (just as I am) impressed with LINQ and think I will fundamentally change the way we write programs, you just need to get the refresh that is available to make it work on the release version of Visual Studio 2005. Get it here: http://msdn.microsoft.com/netframework/future/linq/
    Posted to Raimond Brookman (Weblog) by Raimondb on October 29, 2005
  • Some more on Linq and C# 3.0 language extensions

    I've been following various sessions today at the PDC on Linq and the C# 3.0 language extensions that are the base foundation to make this work. As the LINQ framework is really cool, I think that goes maybe even more for the language enhancements. By providing Lambda functions, Anonymous types, Object Initializers and Extension Functions, C# ...
    Posted to Raimond Brookman (Weblog) by Raimondb on September 15, 2005
Powered by Community Server, by Telligent Systems