Question 1: Which of the following is the default access modifier in a namespace?
Question 2: Which of the following is the default access modifier of the class members?
Question 3: Which of the following keyword is used to reference two assemblies with the same fully qualified type names?
Question 4: What is missing in the below class definition in order to successfully compile?
public Person
{
public string Name{ get; set; }
}
Question 5: Which is the auto-implemented property in the below code snippet?
public class Person
{
int Id = 0;
public string Name{ get; set; }
private int _age;
public int Age
{
get { return _age; }
set { _age = value; }
}
}
Question 6: Will the following code compile?
public class @class{
}
Question 7: A constructor can have a return type.
Question 8: A constructor can have a different name than a class name.
Question 9: A constructor can be public, private, or protected.
Question 10: Which of the following statements is TRUE about constructors?