Intro Parallel programming is the next post from the Insights on .NET Concurrency series. Parallelism is about making more than one thing happen at the same time, with the main objective being improve the performance of CPU bound operations. Parallel programming model tries to overcome single core limitations. With parallelism we can process larger more complex problems in a more…
Insights on .NET Concurrency: Introduction
Concurrent programming is becoming more affordable to developers now a days within the .NET ecosystem. I am starting a series of blog posts that will show you how and when to use different forms of concurrency in .NET. In this first post we will make a smooth entry to concurrency by covering motivations, definitions, forms of concurrency,…
Insights on Composition over Inheritance
Problem Statement ‘a subclass inherits inappropriate operations from a superclass’ Background The prime motivation for inheritance and composition in object oriented is code reuse [3]. With inheritance, modifications on the superclass would lead to modifications of the subclass because of the implicit self-recursive re-entrant invocations [1]. Such invocations can hinder the evolution of the model.…
Insights on Passing by Reference in C#
Setting the Scene By looking at the following two methods, arguably they seem to do the same thing. But they must be doing something different, hence there existence. So let’s find out.
1 2 3 4 5 6 7 8 9 |
private void FetchOutSomething(out Something sthg) { sthg = new Something(DateTime.Now.Year); } private Something FetchSomething() { return new Something(DateTime.Now.Year); } |
What is passing by reference? In C# method arguments are either passed by value or by reference. By value means passing a…