How to implement singleton from one project to another project?

The idea of the Singleton pattern is to use the same object and not to create a new one. Apart from all the syntax errors in you code snippet, you shouldn't be trying to create a 'new' Singleton. Instead in class B you should have a line like this: private Singleton singleton = Singleton.

Instance The way you wrote it, it wouldn't compile because the Singleton's constructor is not visible in class B.

First, if you are exposing this outside the project, please consider using Abstract Factory Pattern instead of Singleton. See my own question for why this can get out of hand.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions