Can you Explain the following code ?

public class Myclass()
{
private Myclass()
{

}
}

 Posted by Akiii on 9/15/2011 | Category: C# Interview questions | Views: 7711 | Points: 40
Select from following answers:
  1. Its a class inside class
  2. Its a public class containig a private constructor. This class cannot be instantiated.
  3. Both
  4. I don't know
  5. All Above

Show Correct Answer


Source: Head First Books | Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: SheoNarayan on: 9/15/2011 | Points: 10
Looks like you are missing the class keyword in the public declaration. May be the code snippet should be

public class Myclass() 

{
private Myclass()
{

}
}


Correct me if I am wrong.

Thanks
Posted by: Akiii on: 9/15/2011 | Points: 10
Oh, thank you sir...i am very sorry for the above mistake....
I am making the changes asap....

Regards
Akiii

Login to post response