What is an indexed property?

Answer Posted / anil sharma

you include the index parameter in the Property statement.
In this example, the test_number parameter is the index for
the Scores property.


Public Class Student
' The private array of scores.
Private m_Scores(9) As Integer

' The indexed Score property procedures.
Public Property Score(ByVal test_number As Integer) As _
Integer
Get
Return m_Scores(test_number)
End Get
Set(ByVal Value As Integer)
m_Scores(test_number) = Value
End Set
End Property
End Class

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the differences between vb.net and c#, related to oops concepts?

517


Observations between vb.net and vc#.net?

569


What is the difference between compiler and interpreter?

548


Did vb6 support multi-threading ?

537


What is the differences between dataset.clone and dataset.copy?

633






Define clr?

545


Is vb.net a programming language?

534


Explain how to achieve polymorphism in vb.net?

545


what is the advantage of option strict on?

601


What is the maximum size of the textbox?

534


Explain convert.tostring and i.tostring method?

525


Explain the use of serialization and deserialization?

513


Explain private assembly?

510


what is common language specification?

516


What languages does the .net framework support?

543