Thanks for all that participate in solving my problem.
I still have a question that did not solved.
I'll list my understanding and please let me know if somethings incorrect.
- Every class must has a based class and its root must be System.Object.
- In System.Object has ToString method that overridable.
- So, If I declare a class without Inherits clause.
Does it inherits from System.Object by default? Why it does not show
(Overrides) section in "Class Name" dropdown list.
Public Class Person
Public FirstName, LastName As String
' ---- How can I create an overrides function of System.Object.ToString here,
' ---- with helpping from Visual Studio .Net IDE?
' ---- Which I currently know is _manually_ type the function header
' ---- with a correct signature as this:
Public Overrides Function ToString() As String
Return FirstName & " " & LastName
End Function
End Class
Thank again,
Surrealist.
"Herfried K. Wagner [MVP]" wrote:
* "=?Utf-8?B?U3VycmVhbGlzdA==?=" <Su********@discussions.microsoft.com> scripsit: It's work fine for a Form.
But how about if I create my own class?
It's not has (Overrides) for me.
Mark the methods as 'Overridable'.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>