Some time ago, I showed a way to avoid deadlocks when reading the redirected console of a child process in a synchronous way. It works, but only when we have to deal with a single output stream – standard output or standard error stream. But what should be done when both […]
Before C# 7.0 it was not possible to throw an exception directly in expression-bodied members. The workaround was to call a method that throws an exception.
Expression bodied members were a very popular feature of C# 6.0. Unfortunately, their usage was limited only to methods and properties.
There are situations when one needs a small helper method, but it’s not quite obvious where to put it. The method might not be generic enough to expose it as a new entity or even as a class member.
C# 7.0 introduced nice improvements to literals. Both digit separator and binary literals can improve code readability.