.Net Core

Null Object Pattern

Almost every method that we write, irrespective of the programming language, we always have checks like the following one: [crayon-5c685236c8a01361701062/] We end up adding so many null checks in our methods, that it gets almost hard to figure out what we are supposed to do in our method. This makes our Read more…

By Gaurav Gahlot, ago
.Net Core

Anonymous Types in C#

Generally, for an object to encapsulate some properties, the type of the object has to be defined first. On the contrary, anonymous types provide a convenient way for an object to encapsulate readonly properties without explicitly defining the type first. The type of each property is deduced by the compiler. Read more…

By Gaurav Gahlot, ago