Enumerable.Empty Vs Array Initialization Syntax

The following set of code showcases two most commonly used methods to generate an empty array in C#. What would be the output of the above lines of code ? One might be tempted to say both returns True. However, that isn't quite right. The output is as follows. The Enumerable.Empty returns the same empty … Continue reading Enumerable.Empty Vs Array Initialization Syntax

Async : IProgress and Immutability

In the previous post, we explored IProgress interface briefly and understood how it helps us in reporting progress. It seemed a perfect fit choice, with little chances of human errors. However, there are things one needs to be aware of to ensure you do not end up with unrecognizable errors. Let's rewrite the code in … Continue reading Async : IProgress and Immutability

Reporting Progress in Async Method

Quite often you would need to provide some kind of progress from your long running asynchronous method, especially if it process multiple activities. Though there might be multiple ways to achieve it, Microsoft provides us with a simple and efficient interface IProgress, which enables us to achieve the result. Let's hit the code straightaway. The … Continue reading Reporting Progress in Async Method