D
D
Denis Bredun2020-07-08 21:09:53
C++ / C#
Denis Bredun, 2020-07-08 21:09:53

When we call the GetType() method of the Object class, what happens under the hood?

When we call the GetType() method of the Object class, what happens under the hood? What does this method refer to, the object itself on the heap, or the object-type of this object? And, probably, another stupid question, where exactly is it written that this object is of such and such a type? In the object itself in the form of service information? How is infa written that this object is of such and such a type?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-07-08
@Luffy1

In Richter, by the way, in my opinion, everything is described the same, at least further.
tooslowexception.com/how-does-gettype-work

R
Roman, 2020-07-09
@yarosroman

Do not be stingy and buy a book by Sasha Goldstein (500 rubles a digital copy costs), look at Stanislav Sidristy's book, there is a github. Everything is well described there. And the internal structure of the class, and how function calls, including virtual ones, occur. Immediately a lot of questions will disappear.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question