5 Ways to Implement the Singleton Design Anti-Pattern in C#

Sasha Marfut
Level Up Coding
Published in
4 min readJan 23, 2021

--

Photo by Csaba Balazs on Unsplash

The singleton design pattern helps to limit instantiation of a class to a single object.

A few facts about the singleton design pattern:

  • One of the most hated design patterns.
  • Erich Gamma would drop the singleton pattern from the Gang of Four book.
  • The pattern is easy to misuse.

--

--

1 million+ views on Medium | .NET, Design Patterns, Architecture, API