Browse by Tags

Tagged Content List
  • Blog Post: Continuing to an outer loop

    When you have a nested loop, sometimes you want to “continue” the outer loop, not the inner loop. For example, here we have a sequence of criteria and a sequence of items, and we wish to determine if there is any item which matches every criterion: match = null; foreach(var item in items) { foreach...
  • Blog Post: Query transformations are syntactic

    As you probably know, there are two ways to write a LINQ query in C#. The way I personally prefer is to use the “query comprehension” syntax: from customer in customerList where customer.City == "London" select customer.Name Or you can, equivalently, use the “fluent method call” syntax: customerList...
  • Blog Post: What's the Difference, Part Four: into vs into

    The keyword "into" in a query comprehension means two different things, depending on whether it follows a join or select/group. If it follows a join, it turns a join into a group join. If it follows a select or group then it introduces a query continuation. These two features are quite different, but...
Page 1 of 1 (3 items)