-1
votes
3answers
200 views

Is it possible to encapsulate the object itself within a dynamic property?

I ask this question out of curiosity. Lets say the class Foo is a singleton and I want to call Foo instead of Foo.Instance to access the static object. Would it be possible to encapsulate the ...
2
votes
1answer
764 views

const vs. readonly for a singleton

First off, I understand there are folk who oppose the use of singletons. I think it's an appropriate use in this case as it's constant state information, but I'm open to differing opinions / ...
3
votes
3answers
7k views

Static class vs Singleton class in C# [duplicate]

Possible Duplicate: What is the difference between all-static-methods and applying a singleton pattern? I need to make a decision for a project I'm working of whether to use static or ...
10
votes
4answers
3k views

Dependency Injection and Singleton. Are they two entirely different concepts?

I've been hearing about using the dependency injection over Singleton for my colleague. I still can't make out if it they are two orthogonal patterns which can be replaced with one another? Or is DI a ...