Hey, On Mon, Apr 26, 2010 at 6:42 PM, Jan <[email protected]> wrote: > Is it expected that TypeReference.GetElementType and > ArrayType.ElementType are returning different results.
Yeah. GetElementType returns the top most original type, so if you have a: int*[]& Crazy, but still, it will return you int. But if you have: int*[]& ElementType will return the direct ElementType, int that case int*[], whose ElementType will be int*, whose ElementType will be int. > It is a little confusion when I have to call Resolve, when I have to > cast and when I can use GetElementType directly. Both are different things. Resolve turns a *Reference into a *Definition, but it has to open its containing module if it's not the current one. GetElementType is used to get direct access to the original ElementType of a TypeSpecification. -- Jb Evain <[email protected]> -- -- mono-cecil Subscription settings: http://groups.google.com/group/mono-cecil/subscribe?hl=en
