1.We can prevent object creation from outsider class when we have only Private Constructor(s).
2. Create an instance of non static's method's class and invoke nonstatic method
1.We can prevent object creation from outsider class when we have only Private Constructor(s).
2. Create an instance of non static's method's class and invoke nonstatic method
you can call non-static method from static method. See example
public class MyClass
{
private void data1()
{
}
private static void data2()
{
MyClass c = new MyClass();
c.data1();
}
}