G
Giovanni Bassi
Hello All,
I have a very simple problem.
I'd like a derived class to ALWAYS override the ToString Operation. For this
reason I have writen on the base class:
Public MustOverride Overloads Function ToString() As String
And on the Derived Class:
Public Overrides Function ToString() As String
'New overriden method
End Function
The problem is that if I use that line on the base class, it's derived
overriden form is never called. I end up getting the default result for a
ToString call to an object: the object's full name (like
"System.Data.SqlClient.SqlCommand").
Anybody knows why that is happening? Is there a way to do what I want?
Tks,
Giovanni Bassi
I have a very simple problem.
I'd like a derived class to ALWAYS override the ToString Operation. For this
reason I have writen on the base class:
Public MustOverride Overloads Function ToString() As String
And on the Derived Class:
Public Overrides Function ToString() As String
'New overriden method
End Function
The problem is that if I use that line on the base class, it's derived
overriden form is never called. I end up getting the default result for a
ToString call to an object: the object's full name (like
"System.Data.SqlClient.SqlCommand").
Anybody knows why that is happening? Is there a way to do what I want?
Tks,
Giovanni Bassi