Complete the code to declare a multi-parameter indexer that returns an integer.
public int this[int [1], int col] { get { return data[row, col]; } }
The indexer uses row as the first parameter name to access the data array.
Complete the code to set a value using the multi-parameter indexer.
public int this[int row, int [1]] { set { data[row, col] = value; } }The second parameter is named col to match the setter's usage.
Fix the error in the indexer declaration by completing the parameter list.
public string this[[1]] { get { return matrix[row, col]; } }
The indexer requires two integer parameters to access the 2D matrix.
Fill both blanks to complete the multi-parameter indexer that sets a value in a 2D array.
public double this[[1], [2]] { set { grid[row, col] = value; } }
The indexer parameters must be int row and int col to match the grid indices.
Fill all three blanks to complete the multi-parameter indexer with get and set accessors for a 3D array.
public char this[[1], [2], [3]] { get { return cube[x, y, z]; } set { cube[x, y, z] = value; } }
The indexer requires three integer parameters x, y, and z to access the 3D array.