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

understand the inherited constructors of class

by edupicker(체르니) 2008. 6. 25.
Visual Basic .NET automatically will call the Base-class constructor method when the Derived-class constructor method starts.
The following program, ThreeConstructors creates three classes named GrandParents, Parents, and Children.

Class Parents inherits Class GrandParents, and Class Childern inherits Class Parents
When you run the program, your screen will first
display class GrandParents’constructor message, followed by class Parents’constructor message, and finally class
Children’s constructor message:

source:
사용자 삽입 이미지
execution :
사용자 삽입 이미지

I think Class definition is some difficult like pointer
In C, C++, etc.
But If the definition is understanded, you'll be a powerful programmer.

have a good day!!!