pmclinn,
I suspected that you "think you want" to dynamically create a Class or
Structure. I was just testing the waters to see how persistent you are :-)
I have to ask, once you dynamically create the assembly, how are you going
to actually do "Do amazing things" in the code?
In order for your code to use the assembly you need to reference the
assembly where the type is, however if you dynamically create the assembly &
type you do not have the assembly to reference! The Seperated Interface
Pattern may be useful here.
http://martinfowler.com/eaaCatalog/s...Interface.html
I'm asking these questions not so much to scare you off, just to get you to
think about what you really getting into... ;-)
You can use either System.CodeDom or System.Reflection.Emit to dynamically
create an Assembly & Type. I would use CodeDom more for tools, where I
create the assembly once, then use it many times (many program executions).
I would use Reflection.Emit where I create the assembly & use it during the
execution of the program only... Of course I may also choose one over the
other if one provided easier then the other for the task at hand...
I have not looked deeply yet, but these article may be a good starting point
for Reflection.Emit & your task at hand:
http://www.codeproject.com/useritems/autocaster.asp http://www.codeproject.com/useritems...dsafeforms.asp
Post if you need CodeDom samples.
However I am still recommending a DataTable over a dynamic assembly, as I
don't see anything in your "requirements" that really warrents a dynamic
assembly... Hence the "think you want" comment above...
Hope this helps
Jay
"pmclinn" <pe***@mclinn.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
Specifically I want to try to dynamically create a structure, or
class(.dll) in memory that I can refrence. I understand how the
datatables/rows... work but that is not what I'm looking for.... Thank
you though for your response.