Reputation: 15718
When a method is called in MSIL, I usually see the value !!0
being passed a parameter, often multiple times in a row.
What does this mean, specifically, I assume it means Pop the first value off the stack and push it as a parameter. However, I was wondering if there was further clarification than that. For instance does the first !
mean something and the second !
represent repeating the last step, in preparation for the next parameter assignment?
Explicitly, what does the !!
operator do?
Upvotes: 2
Views: 89
Reputation: 63772
Generic parameter in a method definition, accessed by index from 0
As in the ECMA specification for CIL.
Section 11.7.1 - Types. It's ECMA 335, if the link becomes dead in the future something :)
So in human terms, it's a pointer to a type of the generic argument of a generic method. For types of generic arguments of generic types, you'd use !0
(and !1
etc.) instead.
Upvotes: 3