What is runtime and internalcall? Many people may be confused about this question. Runtime and internalcall are a modifier of methods in msil. They can also be considered as an attribute. Similar to these two modifiers, there are also managed and unmanaged, and of course there are others, but perhaps only these two are familiar. Runtime, internalcall, managed, unmanaged, and so on are all directly shared with one byte in metadata, which means that each function will be modified. Most methods are marked with the two identifiers "managed Il". Occasionally, you may be able to see the two identifiers "unmanaged" and "native. But I don't think most people will know that there are still runtime and internalcall. I know that there are two things, but I don't know how to use them.
Two days ago I studied delegate and saw the runtime again. I also raised some discussions between Dudu and me. Of course, the center around it is not what the runtime is. However, my curiosity once again made me interested in this item, so I had to look for information everywhere. Search on Google, it does not seem to be found. Find the information in msdn or even tools developer, which is not detailed. Later, I couldn't help thinking about it. Instead, I quickly gave some related online information. It should be noted that this information is useful and related to my issue, but it does not seem to be a mechanism issue, but a side ball.
To put it simply, you can see some simple statements on msdn or tools developer:
Runtime is provided by the runtime. A function modified with runtime should not have a function body.
Internalcall is implemented by the Runtime Library (as mentioned in msdn). Such a modified function can access the unmanaged wrapper provided by bcl (baseclasslibrary, in order to implement more underlying functions (the statement in tools developer cannot be guaranteed by making no mistakes, but it is not said to this document now ).
After reading for a long time, I still haven't figured out my doubts:
Is runtime dynamically generated? Or staticCodeWhat is provided at runtime?
What is internalcall? What is the actual difference with runtime? (Or, if I am a member of the CLR project team of MS, someone should tell me when to use runtime and internalcall .)
Currently, I only know the following conclusions:
1. runtime can only appear in user-defined delegate.
2. It is unclear about internalcall, but it is easy to find it in the runtimetype class.
Can anyone tell me the difference between runtime and internalcall? (I hope someone in MS can tell me something. I'm curious .)