Below statement declare variable i type of int and assign it value 100
AddMethod(MemberAttributes.Public | MemberAttributes.Static, ()=>"Print",
   Emit.declare(typeof(int), "i"),
   Emit.assignVar("i", ()=>100)
)
Below statement declare variable i type of int and assign it value 100 plus the value of parameter j
AddMethod(MemberAttributes.Public | MemberAttributes.Static, (int j)=>"Print",
   Emit.declare(typeof(int), "i"),
   Emit.assignVar("i", (int j)=>100+j)
)

Last edited May 16, 2009 at 9:18 AM by AlexShirshov, version 1

Comments

No comments yet.