CS Fundamentals

Implicit vs Explicit Dependencies

If our class depends upon other classes to complete its operations, then these other classes are dependencies for our class. Our class can have these dependencies as implicit or explicit dependencies. What does this mean? What effect does it have on our application design? Let’s try to find answers to similar questions.   Implicit Dependencies Read more…

By Gaurav Gahlot, ago
.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-5c6852bede585227194165/] 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