Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public sealed class Singleton
- {
- to achieve singleton
- (private static , private (correct) , public , protected )
- ..... Singleton()
- {
- }
- private static Singleton instance = null;
- public static Singleton Instance
- {
- get
- {
- if (instance == null)
- {
- instance = new Singleton();
- }
- return instance;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement