Overrided ToString doesn't show in debug
- by marco.ragogna
I have a collection similar to:
Public Class MyCollection
Inherits ObservableCollection(Of MyCollection)
Private _Name As String
Public Property Name() As String
Get
Return _Name
End Get
Set(ByVal value As String)
_Name = value
End Set
End Property
Public Overrides Function ToString() As String
Return "Name: " & _Name
End Function
End Class
I have overrided ToString method in order to help in debug, but it doesn't show up.
In the code that follow if, during debug, I move the mouse over coll it shows me Count = 0
Private Sub Window1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
Dim coll As New MyCollection
coll.Name = "Test"
End Sub
Do you know what could be the problem?