For A Class Student Consisting Of Indexer Which Among The #458
For a class student consisting of indexer, which among the following declaration of indexers runs the C# code successfully?</p> <pre><code class="language-csharp"> student a = new student(); a[1,2] = 20; </code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs108 CSharp. It can also be found in gs gs108 Indexers and Exception Handling - Introduction of Indexers - Quiz No.1.
For a class student consisting of indexer, which among the following declaration of indexers runs the C# code successfully?
student a = new student(); a[1,2] = 20;
class student { int[,] p = new int[6, 6]; public property WriteOnly int this[int i, int j] { set { a[i, j] = value; } } }
class student { int[,] a = new int[6, 6]; public int this[int i, int j] { set { a[i, j] = value; } } }
class student { int[,] a = new int[6, 6]; public int property WriteOnly { set { a[i, j] = value; } } }
None of the mentioned