I didn't encounter that too. Strange...

Doing this (below) in VisitInstruction should have be fine right?

OpCode opCode = instr.OpCode;
object operand = instr.Operand;
Console.Write("###" + opCode + " " + ((operand != null)? operand.ToString() : "") + "###");
Console.WriteLine();

--------------------------------------------------
From: "Jb Evain" <[email protected]>
Sent: Monday, January 11, 2010 12:07 AM
To: <[email protected]>
Subject: Re: [mono-cecil] Field read and write

On Sun, Jan 10, 2010 at 1:57 PM, Wee Li Yen <[email protected]> wrote:
But how come Jb said "So if you want to detect where PI is used, you have to check for the `ldc.r8 Math.PI` pattern."? My previous post was trying to say
that I can't find this.

ldc.r8 takes a value. What am saying is that you can assume that if
you encounter a ldc.r8 which has a double operand containing the value
of Math.PI, you can assume that it's what you're looking for.

--
Jb Evain  <[email protected]>




--
--
mono-cecil

-- 
--
mono-cecil

Reply via email to