Answer the question
In order to leave comments, you need to log in
How does the heap show or record that, for example, class B inherits from class A?
There is a code:
class A
{
}
class B : A
{
}
Answer the question
In order to leave comments, you need to log in
no way. this is written in the program text, and the ps compiler builds the sequence of calls
if we write B b = new B(); in the Main method, then we will first call the static constructor in class B, then the static constructor in class A, then the dynamic constructor in class A, and the dynamic constructor in class B.and don't bother with static at all until you really understand what it is. this is not very clear at the initial stages of learning, and it definitely should not be taken into account until you get to the need to create your own overrides of static constructors
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question