C#: LINQ – SkipWhile to get objects

Please see my other Web articles. Use SkipWhile() to include a condition for skipping objects. In this article I’ll demonstrate how to use SkipWhile() to set a condition on which to skip objects when building a collection. First, I’ll get a collection of static Person objects. Now I’ll call SkipWhile() on my collection using Method syntax…

C#: LINQ – TakeWhile to get objects

Please see my other Web articles. Use TakeWhile() to include a condition for getting objects. In this article I’ll demonstrate how to use TakeWhile() to set a condition on which to get a collection of objects . First, I’ll get a collection of static Person objects. Now I’ll call TakeWhile() on my collection using Method syntax…

C#: LINQ – Call Custom Method

Please see my other Web articles. Using a Custom Method during a Query In this article I’ll demonstrate how to call a custom method during a LINQ query. In my previous article, I demonstrated how to use the SET operator during a query. In this example, I’ll perform another set task, but this time using a…

C#: LINQ – Set Operator

Please see my other Web articles. Use LINQ to update values during a query. This article will demonstrate how to perform a SET, similar to sql SET during a query. First, I’ll populate a List<T> collection of Person objects. Now, I’ll call ForEach() on each person object, assigning the length of FirstName to the FNameLen property…