csharp OOP Questions & Answers

Question 6: Which of the following types can participate in inheritance in C#?

Question 7: Which of the following is not supported in C#?

Question 8: Which of the following statements is FALSE?


Question 9: A class can inherit one or more Struct.

Question 10: What will be the output of the following program?

class Shape
    protected int Sides { get; set; }

class Square : Shape
    public int GetSides()
        return this.Sides;

Shape sq = new Square();
sq.Sides = 4;