neodatatype
Regular
Hi all,
I'm playing with the Reflection.Emit, and all was going on when I got a little stop:
I created my AssemblyName and my TypeBuilder.
I like to do a myMethodBuilder.GetILGenerator().DeclareLocal() of the type I'm being building...
I explain
I get my TypeBuilder (for "MyType" class), I get the TypeBuilder.DefineMethod().
Within thid MethodBuilder (before the myTypeBuilder.CreateType()) I whant to declare a variable of "MyType" but I cannot get the System.Type.GetType("MyType")!!!
In C# it would be something like
Can I create this class via Reflection.Emit?
I hope I was clear
I'm playing with the Reflection.Emit, and all was going on when I got a little stop:
I created my AssemblyName and my TypeBuilder.
I like to do a myMethodBuilder.GetILGenerator().DeclareLocal() of the type I'm being building...
I explain
I get my TypeBuilder (for "MyType" class), I get the TypeBuilder.DefineMethod().
Within thid MethodBuilder (before the myTypeBuilder.CreateType()) I whant to declare a variable of "MyType" but I cannot get the System.Type.GetType("MyType")!!!
In C# it would be something like
C#:
class MyType {
public void MyMethod () {
MyType x;
}
}
Can I create this class via Reflection.Emit?
I hope I was clear