Posts Tagged: csharp
Discover tips, tricks, and best practices for programming in C#, a popular and powerful programming language for building Windows and web applications.
- Using The Factory Design Pattern in .NET
Discover how to use the Factory design pattern in .NET applications to create objects in a flexible and maintainable way. It provides examples of real-world scenarios where the pattern could be used to improve code quality, and demonstrates how to implement the Factory pattern in C# code.
- Using The Decorator Design Pattern in .NET
Discover how to use the Decorator design pattern in C#/.NET to add new behaviours to an object dynamically without changing its underlying structure. See how you can make your code more maintainable and extensible, and see step-by-step instructions for implementing it in C#. Find out how to use the Decorator pattern with dependency injection.
- Using The Singleton Design Pattern in .NET
Discover how to use the Singleton design pattern in C#/.NET to create a single instance of an object that is globally accessible throughout your application. Learn about the benefits and drawbacks of the Singleton pattern, how to implement it using Lazy<T> for thread-safety, and its role in modern .NET development and Dependency Injection.
- Using the Builder Design Pattern in .NET
Discover how to use the Builder pattern in C#/.NET to create more maintainable and flexible code. Learn implementation tips and answers to FAQs in this comprehensive guide. Improve your .NET development skills and create reusable code today.
- Things you might not know about CSharp - Duck Typing Jan 7
- Things you might not know about CSharp - Using Params with Indexers
In the first part of this series, we are going to take a look at a little known feature with index parameters. See how to pass multiple arguments to a custom indexer.
- Setting Up A Repository Template In Github For .Net
A look into how we can create a Github repository to automatically have our core files in it.
- Implementing Simple Feature Toggles In AspNetCore Using IConfiguration
A look into how we implement simple feature toggles using IConfiguration
- Message Queue Fundementals: MSMQ
This article describes the fundamentals of MSMQ. MSMQ is Microsoft's Message Queuing service that can be used to implement both synchronous and asynchronous solutions.
- Finding Reducible Expressions
This post details the Expressions that can be reduced in the System.Linq.Expressions namespace.
- How your binary search implementation is broken and how to fix it
This post describes how a bug exists in most implementations of a binary search algorithm and how to fix it
- Unit Testing Equals The Forgotten Tests
This post demonstrates often overlooked tests when unit testing an object.
- Enabling HTTP Strict Transport Security HSTS via Web Config
This post describes how to enable HTTP Strict Transport Security (HSTS) via a web configuration file
- Enabling HTTP Strict Transport Security HSTS via ASP Net MVC ActionFilters
This post describes how to enable HSTS in ASP.Net MVC using an ActionFilter
- Becoming An MCP
A bit about how I managed to pass the 70-483 Programming in C# exam to offically become a Microsoft Certifed Professional.
- Using IDisposible correctly
A demonstration of how to use IDisposable correctly.
- Semaphore vs SeamphoreSlim Micro Benchmark
A micro-benchmark to demonstrate the performance difference between the Semaphore and SemaphoreSlim classes in C#
- Extension methods in dotnet
An introduction into .Net's extension methods, how to create them and how to use them.