Hi, I am using .net fw 3.5

I have a method in C#  :

  BaseType GetMethod()
        {
            return new ConcreteType();
        }

And I got the CIL of it using ILDASM :

.method private hidebysig static class Factory.BaseType
        GetMethod() cil managed
{
  // Code size       11 (0xb)
  .maxstack  1
  .locals init ([0] class Factory.BaseType CS$1$0000)
  IL_0000:  nop
  IL_0001:  newobj     instance void Factory.ConcreteType::.ctor()
  IL_0006:  stloc.0
  IL_0007:  br.s       IL_0009
  IL_0009:  ldloc.0
  IL_000a:  ret
} // end of method Factory::GetMethod

So I want to add it to another assembly using CECIL. Can you give me
sample code to create its body in CECIL ?
Thanks

Best Regards,
Akin Ocal
--~--~---------~--~----~------------~-------~--~----~
--
mono-cecil
-~----------~----~----~----~------~----~------~--~---

Reply via email to