Major performance issue of IEnumerable in C#/.NET

IEnumerable can be a performance bottleneck to your application if not used properly. In this blog post, first, I’m going to show how implementing IEnumerable the incorrect way can cause a performance bottleneck.  And after that, I’m going to show, how the performance issue can be fixed easily by using IEnumerable the proper way. The … Read more

Observer Pattern

The observer pattern is a design pattern from the Gang Of Four design patterns. And the observer pattern is a behavioral design pattern. The main intent of this pattern is to define a one-to-many dependency between objects so that when one object changes its state all the objects dependent on it are notified automatically. In … Read more

Iterator Pattern

The iterator design pattern is a behavioral design pattern. It is part of the Gang Of Four design patterns. The main intent of this design pattern is to provide a way to access the elements of an aggregate object sequentially without exposing its underlying representation. In simple language, what the above statement means is that … Read more

Command Pattern

The command pattern is also one of the design patterns from the Gang Of Four design patterns. The command pattern is a behavioral design pattern. And the primary intent of this pattern is to encapsulate a request as an object, thereby letting us parameterize clients with different requests queue or log requests and support undoable … Read more

State Pattern

The state design pattern is one of the patterns from the Gang of Four design patterns. It is a behavioral design pattern. The primary intent of the state pattern is to allow an object to alter its behavior when its internal state is changed. In your day-to-day implementation, you may be encountering the state pattern … Read more

Proxy Pattern

Hello everyone, and welcome to .NET Core Central. In this blog post, I will walk through the proxy design pattern. The proxy design pattern is one of the design patterns from the Gang of Four design patterns. And the proxy design pattern is probably one of the simplest and easiest to understand and implement design patterns … Read more

Flyweight Pattern

Hello everyone, and welcome to .NET Core Central. In this blog post, I will walk through the flyweight design pattern. The flyweight design pattern is one of the design patterns from the Gang of Four design patterns. The intent of the Flyweight Pattern The flyweight design pattern is a structural design pattern. And the main intent … Read more

Decorator Pattern

Hello everyone, and welcome to .NET Core Central. In this blog post, I am going to walk through the Decorator Pattern. The decorator design pattern is one of the patterns from the gang of four design patterns. The decorator pattern is a structural design pattern. The main intent of the pattern is to attach additional responsibility to an object dynamically. … Read more

Bridge Pattern

Hello everyone, and welcome to .NET Core Central. In this blog post, I am going to walk through the Bridge Pattern. The bridge design pattern is one of the patterns from the gang of four design patterns. The bridge pattern is a structural design pattern. The main intent of the bridge design pattern is to decouple an … Read more