use of private constructor : it cant able to create instance, it cant be inherit, it contain only static data members
without private constructor also i can able to access class with its static declaration and static data member when assign value like the below example
class Test
{
public static int x = 12;
public static int method()
{
return 13;
}
}
class Program
{
int resut1 = Test.x;
int resut2 = Test.method();
static void Main(string[] args)
{
}
}
so i have doubts as below why should go to private constructor what is the use of private constructor block is we cant do anything inside of private constructor block when it execute please explain clearly
thanks in advance