Whats is the use of a private constructor? Calling non- static method from a static class, Is this possible?
Deepha Balachandran
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
Yes
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();} }
http://www.c-sharpcorner.com/uploadfile/0c1bb2/constructors-and-its-types-in-c-sharp/
Not Possible.Class cannot have private constructor and static class cannot have non static method.