1.1. Introduction

Data domains are different from object domains. When we deal with objects like arrays and collections, we use iteration to retrieve their elements. If we're looking for a particular element based on its content rather than its index, we have to use a loop and process each element individually. For example, for an array of strings there is no built-in method to retrieve all elements whose length is equal to a particular value.

LINQ addresses this challenge by providing a uniform way to access data from any data source using familiar syntax. It lets us focus on working with data rather than on accessing it.

LINQ to Objects can be used with any class that implements the IEnumerable<T> interface. Let's look at how it works.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.67.40