Class and Objects

Mar 11 2015 1:23 PM
I have a class named as "SAMPLE" with empty constructor.
Note: Constructor is a "PRIVATE"
 
Now in another class if i need to create the instance and to initialize the the  "SAMPLE" class, am getting "Inaccessible due to its protection level."
 
I know the error occurs because constructor is private, if i change the constructor to Public i will not have any issue. 
 
But I should not change the "SAMPLE" class.
 
Now is there any way to create instance for "SAMPLE" class and to initialize that ? Please help me..
 
Thanks in advance. 
 

Answers (4)