C# 7 Series, Part 5: Private Protected

C# has several accessibility modifiers, public, internal, internal protected, and private. Public: The member declared with this accessibility can be visible within the assembly containing this member, or any other assembly that references the containing assembly. i.e., access is not limited. Internal: The member declared with this accessibility can be visible within the assembly containing…

9

The Asynchronous Programming Models

An important new feature of C# 5.0 that comes with Visual Studio 11 is the async and the await keywords. They are syntactical sugars that simplifies the construction of asynchronous operations code. When the C# compiler sees an await expression, it generates code that automatically invokes the expression asynchronously, then immediately return the control flow…

1

Why no ForEach method on IEnumerable interfaces

I was asked many times recently regarding this topic, why not Microsoft introduce an extension method ForEach() on interface IEnumerable<T>? The answer is: "No, and never". Here are some strong reasons to not bring this extension method on IEnumerable. I will be discussing the following design considerations in this post. Design pattern Consistency Runtime behavior…

6