I did search for this first and there are some similar posts, but i couldn't find my answer. :(
Lets say I have a Class:
Public Class ND
Private mNumsDrawn = New List(Of Integer)
Public Sub New(ByVal vNum As Integer)
For i = 1 To vNum
mNumsDrawn.Add(0)
Next
End Sub
Public Property NumsDrawn As List(Of Integer)
Get
Return mNumsDrawn
End Get
Set(ByVal value As List(Of Integer))
mNumsDrawn = value
End Set
End Property
End Class
I want to override the .ToString of the Property NumsDrawn.
If I put the .ToString override in the class then its just overriding the class' .ToString of course. I could use this to output all the numbers in the list, but I want to change the output of one number in the draw.
Dim MyDraw = New ND(6)
MsgBox(MyDraw.ToString)
But what I want is something like this..
MsgBox(MyDraw.NumsDrawn(1).ToString)
Thanks!
MyDraw.NumsDrawn(1).ToString()
? – Alex B.