What changes must be done in the class to compile it
 
    public class Foo { 
         private int[] a = new int[10]; 
         private Dictionary<string, int> b;
         private int[] c = new int[100]; 

         public int this[int i] {         // 1 
             get { return a[i]; } 
             set { a[i] = value; }  
       } 

       public int this[string id] {   // 2 
            get { return b[id]; } 
            set { b[id] = value; } 
       } 

       public int this[int i, int j] { // 3
          get { return c[i*10 + j]; } 
          set { c[i*10 + j] = value; } 
      } 
  }
 

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
C# quizzes
Cosmo
Sign Up Now
or Subscribe for future quizzes