Ok :(

Thanks,

On Fri, Oct 21, 2011 at 9:47 AM, Jb Evain <[email protected]> wrote:

> Hey,
>
> On Fri, Oct 21, 2011 at 5:41 PM, deedee <[email protected]> wrote:
> > Hi,
> > I have two properties, that return integers, one a constant, the other
> > a literal.
> >
> > public int Amount1 { get { return Class1.ConstantAmt; } }
> >
> > public int Amount2 { get { return 9; } }
> >
> > public Class1
> > {
> >   public const int ConstantAmt = 9;
> > }
> >
> > The instructions for both properties look the same. Is there a way to
> > know if the value '9' came from a constant or a literal?
>
> Not at the IL level, C# will emit a plain `ldc.i4 9` in both cases.
>
> Jb
>
> --
> --
> mono-cecil




-- 
Vidisha Ghosh

-- 
--
mono-cecil

Reply via email to