Hey Thank you so much for the reply.
Every small number in an instruction counts!

Thanks again :)

On Thu, Jun 16, 2011 at 11:39 AM, Jb Evain <[email protected]> wrote:

> Hey,
>
> On Thu, Jun 16, 2011 at 6:19 PM, deedee <[email protected]> wrote:
> > Is there a way to find out the actual name/value of the enumerator
> > passed in a function?
> >
> > For eg. if there is a function which takes a value of  type enum ABC:
> >
> > public enum ABC {Emma, Lemma};
> >
> > public void FuncXYZ(ABC abc)
> > {
> >  //do something
> > }
> >
> > The corresponding instruction for this call just has
> > "Class::FuncXYZ(ABC)" as the operand.
> > How do I find out which named constant/value of this enum was passed
> > as an argument, when this function was called?
> > i.e. the parameter was ABC.Lemma or ABC.Emma.
> > Casting the operand as a MethodReference, and it's parameter as
> > ParameterReference and then digging in further didn't help. Am I
> > missing something here?
>
> Yes. The value will be passed on the stack before the method call. So
> you'll have a ldc.i4xxxxx which will map to the literal value of the
> enumeration.
>
> Jb
>
> --
> --
> mono-cecil




-- 
Vidisha Ghosh

-- 
--
mono-cecil

Reply via email to