TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
About Singleton
Share
facebook
twitter
linkedIn
Reddit
Topics
No topic found
Content Filter
Articles
Videos
Blogs
News
Complexity Level
Beginner
Intermediate
Advanced
Refine by Author
[Clear]
Akhil Mittal (4)
Sukesh Marla (4)
Sardar Mudassar Ali Khan (3)
Nagaraj M (3)
Kirtesh Shah (2)
Devesh Omar (2)
George (2)
Jaimin Shethiya (2)
Vijay Yadav (2)
Aman Gupta (2)
Muhammad Asif (2)
Ajay Kumar (2)
Ng Cheehou (2)
Aravind Govindaraj (2)
Sourav Kayal (2)
Hemant Jindal (2)
Prashant Koli (2)
Debasis Saha (1)
Rahul Sharma (1)
Hamid Khan (1)
Anupam Maiti (1)
Uday Dodiya (1)
Sai Kumar Koona (1)
Nikunj Satasiya (1)
Chetan Sanghani (1)
Farhan Ahmed (1)
Pratik Patil (1)
Rishabh Bhardwaj (1)
Pankaj Kumar Choudhary (1)
Mohammad Irshad (1)
Jitendra Mesavaniya (1)
Akkiraju Ivaturi (1)
Md Sarfaraj (1)
Rasul Huseynov (1)
John Kocer (1)
Anandu G Nath (1)
Vinoth Xavier (1)
Satyaprakash Samantaray (1)
Rajul Aggarwal (1)
Tahir Ansari (1)
Rahul Singh (1)
Akash Singh (1)
Vivek Kumar (1)
Pankaj Patel (1)
Rohit Rao (1)
Kanchan Naik (1)
Mahesh Alle (1)
Matthew Cochran (1)
Ayush Gupta (1)
Ayan Ansuman (1)
Pushpendra Shukla (1)
Joydip Kanjilal (1)
Anant Vernekar (1)
Mike Gold (1)
Munib Butt (1)
Mukesh Kumar (1)
Oleg Litvinov (1)
Ajay Mor (1)
Abhishek Dubey (1)
Shervin Cyril (1)
Prasad Raveendran (1)
Ozioma Ogbe (1)
Debendra Dash (1)
Prakash Tripathi (1)
Humza Tufail (1)
Ibrahim Ersoy (1)
Jignesh Trivedi (1)
Mukesh Kumar (1)
Apurva (1)
Jeroen van den Heuvel (1)
Ramasagar Pulidindi (1)
Ahmar Husain (1)
Sharad Gupta (1)
Sachin Bhardwaj (1)
Sateesh Arveti (1)
Susan Abraham (1)
Shripad Kulkarni (1)
Related resources for Singleton
No resource found
Understanding Keyed Services in .NET 8
11/13/2024 9:12:24 AM.
Keyed Services in .NET 8 enhance dependency injection by allowing multiple implementations of an interface to be registered with unique keys. This enables flexible dependency resolution, ideal for tai
Learn AngularJS From Beginning: Service - Part Three
10/21/2024 9:48:47 AM.
This article explores AngularJS services, emphasizing their role in organizing and sharing code through dependency injection. It covers creating custom services using the factory, service, and provide
Why In ASP.NET Core logging is often implemented as a singleton
10/20/2024 9:31:50 AM.
In ASP.NET Core, logging is often implemented as a singleton to ensure efficient resource usage, centralized management, and thread-safe logging across the application.
Understanding Service, Factory, And Provider
10/3/2024 11:38:34 AM.
AngularJS provides three methods for creating reusable utilities: Service, Factory, and Provider. All serve the same purpose but differ in implementation. Services are singletons, Factories return new
How to Use Scoped Service from Singelton Service in .NET Core
9/30/2024 5:43:28 AM.
This guide explains how to resolve scoped services from a singleton service, highlighting best practices to avoid common pitfalls and ensure proper resource management in your application.
Understanding AddTransient Vs AddScoped Vs AddSingleton In ASP.NET Core
9/24/2024 7:13:08 AM.
In this article, you will learn about AddTransient Vs AddScoped Vs AddSingleton In ASP.NET Core. Dependency Injection (DI) in ASP.NET Core, focusing on service lifetimes: Transient, Scoped, and Single
Singleton Pattern: Ensuring a Single Instance in .NET Core
9/17/2024 7:19:37 AM.
In this article, we learn about Singleton Pattern: Ensuring a Single Instance in .NET Core. The Singleton Pattern ensures a class has only one instance, providing global access. It's commonly used
Design Pattern (3), Singleton
9/5/2024 12:49:09 PM.
This article will discuss the Singleton pattern.
Understanding HttpClient Best Practice
9/2/2024 7:56:51 AM.
Creating a new HttpClient instance frequently can lead to performance issues like socket exhaustion due to open sockets lingering in the TIME_WAIT state. Instead, reuse a singleton HttpClient instance
Advanced Dependency Injection in .NET Core
8/27/2024 9:38:20 AM.
This guide explores advanced Dependency Injection (DI) in .NET Core through an e-commerce application example. It covers custom service lifetimes, scopes, and managing complex dependency graphs, demon
Singleton Pattern Caching in .NET C#
8/26/2024 4:05:29 AM.
Learn how to implement caching using this pattern to enhance memory management, ensure thread safety, and optimize performance in your applications.
Implementing Dependency Injection In .NET Core Console Applications
7/31/2024 3:56:07 AM.
Learn how to implement Dependency Injection (DI) in .NET Core Console applications. Start by adding the Microsoft.Extensions.DependencyInjection package, then register services using ServiceCollection
Design Pattern (3-1), Differences between Singleton & Static Class
7/29/2024 2:24:17 AM.
This article will discuss the Differences between Singleton and Static Class. This series explores Design Patterns, starting with MVC. The article discusses differences between Singleton and Static cl
Understanding and Using Scope in .NET Core
7/26/2024 5:48:49 AM.
In .NET Core, dependency injection (DI) manages service lifetimes with three scopes: Transient (new instance per request), Scoped (one instance per request), and Singleton (one instance shared across
Singleton Design Pattern in .NET Core
7/26/2024 5:01:10 AM.
The Singleton Design Pattern ensures a class has only one instance and provides a global access point to it. In .NET Core, this involves a private constructor, a static instance variable, and a static
Singleton Design Pattern: Detailed Explanation and Practical Examples
7/24/2024 6:52:58 AM.
The Singleton Design Pattern ensures a class has only one instance and provides global access to it. Implementations include Basic Singleton, Thread-Safe Singleton with synchronization, Double-Checked
Singleton Design Pattern
7/19/2024 9:55:57 AM.
Learn about the Singleton design pattern, which ensures a single instance of a class in Java. Explore eager and lazy loading techniques, including thread-safe solutions like double-check locking and e
Dependency Injection in ASP.NET Core
7/16/2024 5:41:43 AM.
Dependency Injection (DI) in ASP.NET Core enhances modularity, testability, and maintainability by providing class dependencies externally via the built-in Inversion of Control (IoC) container. Config
Angular vs. AngularJS: Key Differences and Syntax Changes
7/15/2024 5:02:27 AM.
AngularJS revolutionized web development with two-way data binding and a modular approach. Angular (2+) addresses performance issues, offering a modern framework with enhanced features like robust dep
Injecting Dependencies of Different Lifetimes in .NET Applications
7/9/2024 7:19:26 AM.
Understanding dependency lifetimes in .NET is crucial for effective dependency injection. Singleton instances persist throughout the application's lifespan, scoped instances are tied to specific r
Services Lifetime Management in .NET Console Applications
7/8/2024 7:43:11 PM.
Learn efficient service lifetime management in .NET Console Applications using Dependency Injection (DI) with Microsoft.Extensions.DependencyInjection. Explore scoped, transient, and singleton lifetim
Design Patterns with C# Examples
6/19/2024 11:57:56 AM.
This article explains design patterns, providing standard solutions for software design problems. It covers Creational, Structural, and Behavioral patterns with C# examples, including Singleton, Facto
Different Types Of Constructor In C#
6/13/2024 10:35:41 AM.
Constructors in C# initialize objects upon creation. They ensure objects start in a defined state by setting initial values or performing necessary setup. Types include default (without parameters), p
Dependency Injection - Service Lifetimes
6/12/2024 10:16:38 AM.
Learn how to manage service lifetimes in Dependency Injection (DI) frameworks. Understand the differences between scoped, transient, and singleton services, and how they impact the lifespan and behavi
Understanding the Singleton Pattern in C#
5/27/2024 5:31:05 AM.
The Singleton pattern is one of the most commonly used design patterns in software engineering. It falls under the category of creational patterns and ensures that a class has only one instance while
RESTful Day #3: Resolve Dependency of Dependencies Using Inversion of Control & Dependency Injection in ASP.Net Web APIs with Unity Container and Managed Extensibility Framework (MEF)
5/24/2024 8:58:56 AM.
Day 3 of RESTful learning dives into resolving dependencies of dependencies using IoC & DI in ASP.NET Web APIs. Employ Unity Container & MEF for seamless extension and management of components
Singleton Design Pattern in .NET C#
5/2/2024 7:00:10 AM.
A design approach known as the singleton pattern limits a class's instantiation to a single object while still allowing access to the object. When precisely one item is required to coordinate acti
Angular Services: Implementation, Examples & Best Practices
4/19/2024 10:53:23 AM.
AngularJS services facilitate modularization and reusability by providing a way to share logic and data across components. They employ dependency injection for seamless integration, enabling efficient
Angular Services: Data Sharing & Logic Across Components
4/17/2024 9:32:58 AM.
In this article, we are going to utilize the Angular Services. Service is nothing but the class having certain operations for a specific purpose. We use Services in Angular to share data among the com
Singleton vs. Static Class in C# - Choosing the Right Approach
4/17/2024 4:54:57 AM.
Singleton and Static classes can only have one instance available in memory, and both classes can be used to maintain the global state of an application, however, there are many differences between th
Singleton Vs Static Classes in C#
4/17/2024 4:49:59 AM.
Why do you use a Singleton class if a Static class serves the purpose What is the difference between Singleton and Static classes and when do you use each one in your program?
Singleton Design Pattern With C# Sample
4/8/2024 9:13:27 AM.
In this article, we will Explore the Singleton Design Pattern in C# with a concise sample code demonstrating its implementation. Learn how to ensure a class has only one instance, providing global acc
Singleton Design Pattern In Flutter
3/21/2024 9:25:49 AM.
Learn how and when to use Singletons, implement them effectively, and explore their advantages and limitations. This article also includes a sample implementation using the shared_preferences package
Better Implementation Of Singleton Pattern in .NET
2/28/2024 4:09:40 AM.
This article explains the mistakes made in writing Singleton Pattern in the multithreaded environment create a bug and how to bring a solution to it.
How To Create To-Do CRUD Operation With ASP.NET MVC Core, Angular 4.0
2/21/2024 10:21:43 AM.
This training session covers how to utilize the Todo in-memory database via the TodoRepository and create a custom ASP.NET MVC API controller with CRUD (Create, Read, Update, Delete) operations.
Design Patterns in C#
12/27/2023 7:42:38 AM.
Design Patterns in the object-oriented world are a reusable solution to common software design problems that repeatedly occur in real-world application development. It is a template or description of
.NET Core: Detail of Lifetime Management
11/21/2023 8:40:20 AM.
In .NET Core, lifetime management refers to how objects are created, used, and eventually disposed of within an application. It ensures efficient resource utilization and prevents memory leaks.
Design Patterns and Steps to Implement Singleton Class in C#
11/13/2023 6:56:50 AM.
Design patterns is the important features of object oriented programming. We need to ensure that only one object of a particular class is instantiated in Singleton design pattern in C#.
Singleton Pattern In C#
10/13/2023 10:47:49 AM.
In this article we will see how to create a single instance of a class using Singleton Pattern.
Problem-Solving with the Singleton Design Pattern: A Before-and-After Code Analysis
10/9/2023 8:43:12 AM.
Explaining Singleton Design Pattern with C# code example
Singleton Design Pattern: Eager And Lazy Initialization With Code Example
10/9/2023 5:54:22 AM.
Explaining the differences between eager and lazy singleton
Building a Robust ASP.NET Core Web API with Singleton Design Pattern and Three-Tier Architecture
10/4/2023 4:38:38 AM.
This example provides a basic structure for a Three-Tier Architecture in an ASP.NET Core Web API, implementing a Singleton Design Pattern for the Data Access Layer. Remember to adjust the code based o
A Deep Dive into Static Classes in C#
9/25/2023 4:26:42 AM.
This article, "Exploring Static Classes in C#," provides an in-depth exploration of the concept and practical applications of static classes in the C# programming language. It elucidates the
Static and Singleton Classes in C#
9/23/2023 7:31:15 AM.
Object-Oriented Programming (OOP) in C# is a way to organize code neatly. There are two types of classes: static and singleton. Static classes have functions that you can use without creating an objec
Dependency Injection And Service Lifetime in ASP.NET Core
9/18/2023 10:40:03 AM.
Dependency injection And Service Lifetime in ASP.NET Core With Realtime example
AddTransient vs AddScoped vs AddSingleton
9/15/2023 5:54:16 AM.
In ASP.NET Core's dependency injection system, you can choose from three service registration options: AddTransient, AddScoped, and AddSingleton. These options dictate how services are managed in
Singleton Design Pattern In C#
9/12/2023 5:51:29 AM.
The Singleton Design Pattern is one of the creational design patterns used in software engineering. It is primarily employed to ensure that a class has only one instance and provides a global point of
Singleton Design Pattern In C# - Part Two (Eager and Lazy Initialization in Singleton)
8/31/2023 5:06:38 AM.
In this article, we’ll discuss Lazy initialization, the lazy keyword, why to make singleton class a sealed class and what are the differences between singleton and static class.
Private Constructor - C#
8/28/2023 9:38:28 AM.
In this article, you will learn about Private Constructor - C#.In C# and many other object-oriented programming languages, a private constructor is a constructor that is declared with the "privat
.NET Core Singleton Dependency Injection With Real Use Case
7/18/2023 9:40:03 AM.
In this article, you will learn about .NET Core Singleton Dependency Injection with a real use case.
Design Patterns In C# .NET (2023)
7/13/2023 9:38:49 AM.
In this tutorial, learn everything about design patterns in C# and how to Implement design patterns using C# and .NET. Factory design pattern, Abstract Factory design pattern, Builder design pattern,
Design patterns and its types
6/28/2023 6:40:40 AM.
Design patterns for well-structured, maintainable software. Creational, structural, and behavioral patterns are discussed with real-life examples.
Singleton Design Pattern In C#
6/6/2023 8:51:56 AM.
In this article, learn what a Singleton Design Pattern is and how to implement a Singleton Pattern in C#.
C# Heap(ing) Vs Stack(ing) In .NET - Part Four
6/6/2023 8:40:24 AM.
Having a basic understanding of how memory management works will help explain the behavior of the variables we work with in every program we write. In this article we’ll look further into Garbage Col
HttpContextAccessor in Asp.NET Core Web API
5/27/2023 3:58:23 PM.
In ASP.NET Core Web API, the HttpContextAccessor class is a component that provides access to the current HTTP request and response context. It allows you to access various aspects of the HTTP request
Singleton Design Pattern Evolution and implementation C#
5/4/2023 5:47:55 AM.
Learn how to implement the Singleton Pattern in C# and its evolution through four different approaches.
AddSingleton Vs AddScoped Vs AddTransient
4/15/2023 5:55:02 PM.
AddSingleton Vs AddScoped Vs AddTransient
What Are The Differences Between Singleton Vs Static Classes In C#?
2/13/2023 10:36:10 AM.
In this article, you will learn what are the differences between singleton vs static classes in c#?
Design Pattern For Beginners - Part-1: Singleton Design Pattern
1/27/2023 9:22:07 AM.
Today let’s start with very common and easy design pattern called Singleton design pattern.
Complete Signup-Login System Using Dependency
7/12/2022 12:23:34 PM.
To design a complete signup-login system using a dependency with the dashboard from the beginning.
Differences Between Scoped, Transient, And Singleton Service
3/9/2022 3:25:03 PM.
Difference between Scoped, Transient, Singleton service in .net core.
Implement Singleton DBManager In ASP.NET Core And C#
2/10/2022 10:14:44 AM.
This article talks about the Singleton Design Pattern, why it is important and then demonstrates how to build a singleton DBManager (a class that wraps all calls to the database) using dotConnect for
Quick Start On Singleton Design Pattern
6/8/2021 11:14:28 AM.
Quick understand of Singleton design pattern with respect to real-world life and technical implementation in c#
Remote Sensing and Remote Control over the Internet with GP-3 Board
1/14/2021 11:16:49 AM.
In this article we will revisit the GP-3 board (which we have employed in a few other hardware projects on C# Corner) and use the GP-3 to measure temperature in a remote location.
Design Patterns In .NET
5/5/2020 9:35:07 AM.
So basically, what are design patterns? We can define design patterns as proven techniques to achieve certain tasks. They give us a basic template to design our application using templates that have p
Dependency Injection Lifetimes In ASP.NET CORE
4/1/2020 8:46:05 AM.
Understanding the Dependency Injection & its lifetimes(Singleton, Transient, Scoped). Example can help to understand the different lifetimes and choose appropriate lifetime for service.
Increase Performance with an Object Pool or Why Singleton May Cause Performance Issues
3/12/2020 11:45:30 PM.
When creating a Singleton, think about if an Object Pool should be used instead.
Singleton Design Pattern With Java Sample
12/26/2019 10:59:41 AM.
In this article we will learn about Singleton Design Pattern and how to implement it
Singleton Design Pattern With Python Sample
12/26/2019 10:54:57 AM.
In this article we will use Singleton Design Pattern and see how to implement it
NULL Object Design Pattern
9/19/2019 1:31:43 AM.
In this video, we will talk about null object design pattern and will see how we can abstract away our client code from null checks across the entire application.
Singleton Design Pattern in Java
8/8/2019 1:43:21 AM.
In this article, we are going to describe the singleton pattern class in Java.
Design Patterns - Singleton
8/4/2019 9:07:02 AM.
In this article, I am explaining about the singleton design pattern and its common application areas. Singleton is one of the design patterns in the Gang of Four (GoF) design patterns.
Singleton Pattern In C#
3/24/2019 10:51:49 AM.
In this article, you will learn about the singleton pattern in C#.
Learn Design Pattern - Builder Pattern
2/26/2019 3:17:13 AM.
In this article we will talk about the Builder Pattern.
Learn Design Pattern - Singleton Pattern
2/26/2019 2:39:05 AM.
In this article we will try to understand what Single Pattern is, what kind of problem it solves and how it should be implemented in ASP.NET.
Design Pattern For Beginner: Part 5: Composite Design Pattern
12/11/2018 4:54:34 AM.
In this article we will be learning how to implement composite design pattern in application.
Learn About Static VS Singleton
6/15/2018 10:23:44 AM.
Static class is implicitly abstract meaning Static class object can neither be created nor instantiated whereas Singleton pattern allows us to create a single (only one) instance of a class.
Singleton Implementation With Real World Example
6/1/2018 8:33:09 AM.
This article describes different ways of singleton pattern implementation and how to make the singleton class thread-safe. I have described with real time problem and given a reference of source code
Singleton Design Pattern In C# - Part Three (Static vs Singleton)
1/11/2018 5:22:33 PM.
In this series of learning singleton patterns, we learned lazy initialization and eager initializations with practical examples. We also learned why it is necessary to make the singleton class sealed
Singleton Design Pattern In C# - Part One
1/11/2018 1:10:23 AM.
I always wanted to write about Singleton design pattern in C#. Though there already are many posts available on Singleton design pattern, I’ll try to cover this topic in the most simplistic and easy t
Your Singleton Might Not Be "Single"
11/21/2017 9:33:03 AM.
Singleton has been a very popular design pattern as it is proven to have some advantages compared to the global variables
Working With Singleton Design Pattern In Real Time Projects
9/13/2016 7:10:45 AM.
In this article, you will learn, what Singleton is and how to use Singleton pattern in projects.
Design Patterns Simplified - Part 2 (Singleton)
7/18/2016 5:12:58 AM.
This article explains what Singleton Design Patterns is, addresses common questions and finally illustrates the implementation.
Implementing The Singleton Design Pattern
6/15/2016 12:31:44 AM.
In this article, you will learn how to implement the Singleton design pattern.
Design Patterns in WinJS #6: Singleton
5/29/2016 3:26:30 PM.
This article covers the implementation of Singleton Design Pattern. This is part six of the article series.
Singleton In OData v4 Using Web API
5/16/2016 12:56:22 PM.
In this article you will learn about Singleton in OData v4 using Web API.
Singleton Design Pattern Vs Static Class
11/2/2015 12:32:06 AM.
In this article, I will demonstrate you what is singleton design pattern and static class.
Implementing Singleton Design Patterns
6/9/2015 12:37:32 PM.
This article describes how a Singleton Design Pattern can be implemented and the difference between a singleton class and static class.
C# Singleton Design Pattern Example: Part 2
4/28/2015 12:52:54 AM.
In this article we will see how to make it Thread Safe.
C# Singleton Design Pattern: Part 1
4/25/2015 7:29:03 PM.
This article explains the basics of the Singleton Design Pattern.
The quest for the Generic Singleton in C#
10/18/2014 12:24:02 PM.
While it is a bit tricky to implement the Singleton pattern in C#, the steps necessary are well known. There has however been debate about a generic solution for this. This paper provides 3 possible solutions for the generic singleton, and makes a brief comparison.
Design Patterns in C#
3/16/2014 12:13:39 PM.
This article describes design patterns for software development.
Real Example of Singleton Design Pattern
8/10/2013 11:38:44 PM.
This article attempts to explain the Singleton Design Pattern. I am not going to provide any formal definition of it, I will just share what I understand about it. Let's consider a real-world example to understand it better.
Singleton Pattern in PHP
1/14/2013 1:28:10 PM.
In this article I explain how to create a singleton pattern in PHP.
Singleton Pattern in iPhone
12/16/2012 3:04:54 PM.
In this article I will explain the Singleton Design Pattern with example.
Learn Design Pattern - Bridge Pattern
10/9/2012 11:16:56 PM.
In this we will explain the Bridge Pattern.
Learn Design Pattern - Proxy Pattern
10/9/2012 8:13:16 PM.
In this article we will explain Proxy Pattern.
Introduction to Parametric Singleton Pattern
10/4/2012 11:55:17 AM.
This article explains about Parametric Singleton Pattern.
Creational Patterns - Singleton
10/4/2012 9:01:59 AM.
This article discusses the implementation of the Singleton Design Pattern.
.NET Remoting: The Interface Approach
9/30/2012 2:33:35 AM.
.NET Remoting provides a powerful and high performance way of working with remote objects. Architecturally, .NET Remote objects are a perfect fit for accessing resources across the network without the overhead posed by SOAP based Web services. .NET Remoting is easier to use than Java's RMI, but definitely more difficult than creating a WebService. In this article, we will create a remote object, and access this object using the Interface.