This time, I'll show how to use override keyword.
Generally, to override a base-class function or subroutine, a derived class must place the Overrides keyword within the method definition to tell the Visual Basic .NET compiler that its goal is to replace the base-class method implementation with its own, as shown here
Public Overrides Function ToString() As String
ToString = Name
End Function
source code
execution
'Visual Basic .NET > Class' 카테고리의 다른 글
A destructor method in a class (0) | 2008.06.26 |
---|---|
using MyBase (0) | 2008.06.25 |
understand the inherited constructors of class (0) | 2008.06.25 |
how about using Multiple Constructors to Support Different Parameters (0) | 2008.06.24 |
how to Initialize Class Member Variables (0) | 2008.06.24 |