Tag: .cs
All the articles with the tag ".cs".
Functional Programming in C#
Published: at 03:13 PMFunctional programming treats computation as the evaluation of functions, avoiding mutable data and side effects. It emphasizes pure functions, making code more predictable, testable, and composable, contrasting with traditional paradigms like OOP.
Delegates in C#
Published: at 05:53 PMIn C#, delegates are types that represent method references, enabling functional programming within an object-oriented framework. They allow methods to be passed as parameters and invoked dynamically.
Leveraging Expressions in C#
Published: at 03:55 PMThis article shows how to make C# code cleaner and more maintainable by using expressions instead of statements. By embracing these expression-based features, we create more concise and maintainable code.
Design Patterns: Builder
Published: at 01:14 PMThe Builder Design Pattern separates object creation from its representation, enabling flexible and controlled assembly of complex objects. It uses a construction interface and concrete builders to produce different configurations efficiently.
Design Patterns: State
Published: at 02:59 PMThe State Design Pattern manages an object's behavior based on its current state, encapsulating state-specific logic in separate classes. This approach results in cleaner, modular code.
Design Patterns: Null Object
Published: at 03:34 PMThis article discusses the Null Object design pattern, explaining how it can be used to simplify code by removing the need for null checks. It covers the impact of null checks on cyclomatic complexity and provides a practical guide to implementing the pattern for cleaner and more maintainable code
Design Patterns: Template Method
Published: at 04:32 PMThe Template Method pattern defines an algorithm's structure in a base class while allowing subclasses to customize specific steps. This approach reduces code duplication, enforces workflow consistency, and supports better extensibility, making it ideal for scenarios like game logic, UI frameworks, and data processing.