Below statement declare variable i of type int and initialize it with value 10
AddMethod(MemberAttributes.Public | MemberAttributes.Static, ()=>"Print",
   Emit.declare("i", ()=>10)
)
Below statement declare variable i of type int, initialize it with value 10 plus j parameter value and print the value to console
AddMethod(MemberAttributes.Public | MemberAttributes.Static, (int j)=>"Print",
   Emit.declare("i", (int j)=>10+j),
   Emit.stmt((int i)=>Console.WriteLine(i))
)

Last edited May 16, 2009 at 7:51 AM by AlexShirshov, version 1

Comments

No comments yet.