Interfaces and what they used for

As a senior developer in C#, one of the most important concepts to understand is the use of interfaces. In this blog, we’ll discuss what interfaces are, how they are used, and some best practices for implementing them. What is an interface? In simple terms, an interface is a contract between two objects. It defines […]

C# Generic Methods

C# is a powerful and popular object-oriented programming language that allows developers to create generic methods to write more reusable and maintainable code. In this blog post, we will discuss what generic methods are, how to create them, and how to use them in C#. What are generic methods in C#? A generic method is […]

When to containerize an application

Containerizing an application is a popular method for delivering software in a standardized, efficient, and scalable way. It involves packaging an application and its dependencies into a self-contained unit called a container, which can be easily moved from one environment to another. Containers are beneficial in many ways: However, there are also situations where containerizing […]

Extention Methods

An extension method in C# allows you to extend the functionality of an existing type without modifying its source code. This is accomplished by defining a static method with a special syntax in a separate class. The method will appear as if it were a part of the original type, giving you the ability to […]

Reconsider your “IF” statements

C# is a powerful programming language that is widely used for developing a variety of applications, including desktop, mobile, and web applications. One of the key features of C# is the ability to control the flow of a program using conditional statements such as if-else statements. However, in some cases, it may be beneficial to […]

SOLID principles in C#

SOLID is an acronym for five design principles that aim to make software design more maintainable and scalable. The SOLID principles were introduced by Robert C. Martin and are widely recognized in the software development community. Here is a brief explanation of each SOLID principle and how it applies to C#: Single Responsibility Principle (SRP): […]

Activator.CreateInstance: A Convenient Way to Create Objects in C#

C# is a popular, modern programming language that is widely used for developing Windows-based applications. One of the key features of C# is its ability to use reflection, which allows developers to inspect and manipulate code at runtime. One of the most useful classes in the reflection namespace is the Activator class, which provides methods […]

Refactoring and removing switch statements in C#

Switch statements are a common way to handle different cases in a program, but they can quickly become unwieldy and difficult to maintain as the number of cases increases. In this blog post, we’ll take a look at how to refactor and remove switch statements in C# to make your code more readable and maintainable. […]

Kill the Switch statements

Has I continue my work as a Software Engineer I get exposed to a plethora of development styles, but one common element is the “Switch” statements. I don’t believe this is the best approach. Why? Because if there is another condition that needs to be evaluated you need to modify the code that has already […]

Please don’t do this

Recently, I was asked to look at some code and I want to share something that I think should ever be placed in an enterprise level application. Let me say that we are not permitted to use Entity Framework, so everything that we do now is hand jammed. In this application we have 20 classes […]