LINQ in Action Chapter 3

LINQ in Action Chapter 3Short Description
This chapter covers:
+ An introduction to the key elements of the LINQ foundation
+ Sequences
+ Deferred query execution
+ Query operators
+ Query expressions
+ Expression trees
+ LINQ DLLs and namespaces

Website: www.manning-source.com | Filesize: 638kb
No of Page(s): 35

Content
…An iterator is an object that allows you to traverse through a collection’s elements. What is named an iterator in .NET is also known as a generator in other languages such as Python, or sometimes a cursor, especially within the context of a database. You may not know what an iterator is, but you surely have used several of them before! Each time you use a foreach loop (For Each in VB.NET), an iterator is involved. (This isn’t true for arrays because the C# and VB.NET compilers optimize foreach and For Each loops over arrays to replace the use of iterators by a simple loop, as if a for loop were used.) Every .NET collection (List, Dictionary, and ArrayList for example) has a method named GetEnumerator that returns an object used to iterate over its contents. That’s what foreach uses behind the scenes to iterate on the items contained in a collection. If you’re interested in design patterns, you can study the classical Iterator pattern. This is the design iterators rely on in .NET.

Get the file Download here

AddThis Social Bookmark Button
Related Books:
  • An Introduction to LINQ (Chapter 2)
  • C# 3.0 and Linq Final.ppt
  • LINQ L anguage In tegrated Q uery. LINQ is coming with C# 3.0 …
  • LinQ for Java
  • LINQ to XSD
  • The LINQ Project
  • Calling functions in LINQ queries
  • Generics and a taste of LINQ

  • Related Searches: , , , ,



    Comments

    Leave a Reply