Hi, Jb,

It's just as you said.
But I feel confusing about this.
Why ReturnType contains strange name and the correct name goes into
DeclaringType?

As I tested,

By .Net Reflection ==> Get MethodInfo
ReturnType -> System.Collections.Generic.IEnumerator`1
[[System.Linq.Expressions.ExpressionType]]
DeclaringType -> TestWin.Test

By Cecil ==> Get MethodDefinition
ReturnType -> System.Collections.Generic.IEnumerator`1<!0>]
DeclaringType ->
System.Collections.Generic.IEnumerable`1<System.Linq.Expressions.ExpressionType>

The Reflection result is more logical to me.
May I know the reason for Cecil to handle the case like this?

Thanks
Wicky

On 3月24日, 下午3时36分, Jb Evain <[email protected]> wrote:
> On 3/24/09, Wicky <[email protected]> wrote:
>
> >  Then how could I get ExpressionType? I see IEnumerator but couldn't
> >  find ExpressionType anywhere in ReturnType.
>
> The declaring type of the method will be a GenericInstanceType, its
> GenericArgument collections should have it.
>
> --
> Jb Evain  <[email protected]>
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to