C
C#3y ago
Down

class problem

hi so i want to create class which i want to create only 1 instance of and do i make it a static class or normal?
2 Replies
pip
pip3y ago
you can explore Singleton which gives you more options than Static and accomplishes what you want
pip
pip3y ago
Singleton in C# / Design Patterns
Singleton pattern in C#. Full code example in C# with detailed comments and explanation. Singleton is a creational design pattern, which ensures that only one object of its kind exists and provides a single point of access to it for any other code.
Want results from more Discord servers?
Add your server