1.

For a class student consisting of indexer,which among the following declaration of indexers runs the code successfully ? student a = new student();a[1,2] = 20; a) class student { int[,] p = new int[6, 6]; public property WriteOnly int this[int i, int j] { set { a[i, j] = value; } } } b) class student { int[,] a = new int[6, 6]; public int this[int i, int j] { set { a[i, j] = value; } } } c) class student { int[,] a = new int[6, 6]; public int property WriteOnly { set { a[i, j] = value; } } }

A. A
B. B
C. C
D. None of the mentioned
Answer» C. C


Discussion

No Comment Found