Tag - Interfaces

When and Why to Use Types Instead of Interfaces in C#

When and Why to Use Types Instead of Interfaces in C#

C# developers have long relied on interfaces to build abstractions, promote loose coupling, and enable testability. While interfaces offer valuable capabilities in the right contexts, they are often overused—or misused—when concrete types (classes or abstract classes) could provide a more expressive, maintainable, and robust solution.

C# Keywords Tutorial Part 3: as

Casting, often known as explicit type conversion, is done in C# with the "as" keyword. In particular when working with inheritance and interfaces, it is a safer technique to change the type of an object.We'll examine the "as" keyword's functionality in C# and present code samples to demonstrate how to...

How to Implement Modular Architecture in Your Next Project

Modular architecture is a design approach that breaks down a complex system into smaller, independent, and interchangeable parts or modules. These modules can be thought of as building blocks that can be combined to create a complete system. Modular architecture has gained popularity in recent years as a way to...