KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I recently found out about auto-properties and like them quite a lot. At this moment I am trying to use them everywhere where I can. Not really to just be able to use them everywhere, but more to see how well they work in most situations. Now I am making a singleton and thought:"Hey, let's try auto-properties here as well". public class MySingleton { public static MySingleton MySingleton { get; private set; } private MySingleton() {} static MySingleton() { MySingleton = new MySingleton(); } } So my question is: "Is it a good idea to implement a singleton like this?" I am not asking whether a singleton in general is a good idea.
Tags (comma-separated)
Save Edits
Cancel