본문 바로가기
Visual Basic .NET/Class

how to use overrides Keyword

by edupicker(체르니) 2008. 6. 26.

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
사용자 삽입 이미지