What will be the output of the following code? using System;abstract class Base { protected int number; public abstract int this[int index]; class Child : Base { public override int this[int index] { get { return number; } set { number = value; } } } class Test { public static void Main() { Child obj = new Child(); obj[0] = 20; obj[1]=40 Console.WriteLine(The value is: + obj[0]); } } }
Reveal answer
Fill a bubble to check yourself