123qweasdzc
Programmer
Hello .
I am creating run time classes using System.Reflection.Emit:
AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("DataBuilder.exe"), AssemblyBuilderAccess.Save, AppDomain.CurrentDomain.Evidence);
ModuleBuilder mb = ab.DefineDynamicModule(ab.FullName, "DataBuilder.exe", false);
TypeBuilder tb = mb.DefineType("SerializeClass", TypeAttributes.Public , typeof(object));
...
Then I have a class:
public class ProcessData<T> where T : class
{
....
}
I want to use the type I built as T:
ProcessData<TypeIBuild> processData = new ProcessData<TypeIBuild>();
Is it possible? How?
Thanks
I am creating run time classes using System.Reflection.Emit:
AssemblyBuilder ab = AppDomain.CurrentDomain.DefineDynamicAssembly(new AssemblyName("DataBuilder.exe"), AssemblyBuilderAccess.Save, AppDomain.CurrentDomain.Evidence);
ModuleBuilder mb = ab.DefineDynamicModule(ab.FullName, "DataBuilder.exe", false);
TypeBuilder tb = mb.DefineType("SerializeClass", TypeAttributes.Public , typeof(object));
...
Then I have a class:
public class ProcessData<T> where T : class
{
....
}
I want to use the type I built as T:
ProcessData<TypeIBuild> processData = new ProcessData<TypeIBuild>();
Is it possible? How?
Thanks