LINQ to Objects in Depth (4) Deferred Execution, Lazy Evaluation and Eager Evaluation
As fore mentioned, when LINQ to Objects’ collection queries and value queries are called, they start to evaluate query result. When sequence queries are called, they do not evaluate any query result,
1424 words
|
7 minutes
LINQ to Objects in Depth (3) Generator
After understanding how to use LINQ to Objects queries, this chapter starts to discuss how these queries work internally, including how they execute and how they are implemented. These insights help d
2140 words
|
11 minutes
LINQ to Objects in Depth (2) Query Methods (Operators) and Query Expressions
As fore mentioned, LINQ to Objects standard query methods (also called standard query operators) are provided as static methods of System.Linq.Enumerable type, most of which are IEnumerable<T> extensi
9826 words
|
49 minutes
LINQ to Objects in Depth (1) Local Sequential Query
LINQ to Objects queries .NET objects in local memory of current application or service. Its data source and the queries are represented by IEnumerable<T> interface, and it is executed sequentially. Th
1395 words
|
7 minutes
C# Functional Programming In-Depth (15) Pattern matching
Pattern matching is a common feature in functional languages. C# 7.0 introduces basic pattern matching in is expression and switch statement, including constant value as pattern and type as pattern, a
1397 words
|
7 minutes
C# Functional Programming In-Depth (12) Immutability, Anonymous Type, and Tuple
Immutability is an important aspect of functional programming. As discussed in the introduction chapter, imperative/object-oriented programming is usually mutable and stateful, and functional programm
4144 words
|
21 minutes
C# Functional Programming In-Depth (13) Pure Function
The previous chapter discusses that functional programming encourages modelling data as immutable. Functional programming also encourages modelling operations as pure functions. The encouraged purity
1697 words
|
8 minutes
C# Functional Programming In-Depth (11) Covariance and Contravariance
In programming languages with subtyping support, variance is the ability to substitute a type with a different subtype or supertype in a context. For example, having a subtype and a supertype, can a f
3192 words
|
16 minutes