Michell Johnson

Michell Johnson

  • NA
  • 94
  • 111.2k

Property in C#

Dec 26 2011 11:38 AM
Hi friends,

I want to know that Suppose Stu class has an indexed property. Which is used to set or retrieve values to/from an array of 5 integers called Scores[]. We want the property to report "Invalid Index" message if the user attempts to exceed the bounds of the array. Which of the following is the correct way to implement this property?


Answers (1)