Before start let me tell my experience: I am experienced with C#.NET, web services, XML part and few more. Reflection is something new to me, though I have read extensively on it and tried out some experimental code, but haven't made anything great using reflection
I checked out many examples
of how we can create Type at runtime and then which can be saved in an assembly (.dll) files. Of all the examples I have seen is about saving the created types in the .dll files instead of code file. Isn't there any way to create the code file out of reflection?
I need to create code file since I want to distribute code instead of compiled assemblies. What I want to do is something like xsd.exe
does, either spit out a .dll or the code file(in any language).
Isn't there any way to create a code file, since most of the place I can find is
AssemblyBuilder ab = System.AppDomain.CurrentDomain.DefineDynamicAssembly(an, AssemblyBuilderAccess.Save);
and then lastly
ab.Save("QuoteOfTheDay.dll");