Output
Object A : is created
Object B : is created
Object B : is created
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Vivek KumarPosted Jun 8, 2017, 3:34 AM
Seshadri MPosted Jun 8, 2017, 12:58 AM
I have tried code but still it show error Singletonclass inaccessable.
{
public class loggerclasses
{
private loggerclasses()
{
}
{
get
{
if (instances == null)
{
instances = new loggerclasses();
}
}
}
public class A : loggerclasses
{
public void classa()
{
Console.WriteLine(" object A: is created");
}
}
{
static void Main(string[] args)
{
A obj =new A();
obj.classa();
}
}
Rajkiran SwainPosted Jun 7, 2017, 6:52 AM
Nilesh ShahPosted Jun 6, 2017, 10:48 AM