Script to run functions from a dll

Hy guys.

I have made a script with C# for unity that reads a XML files in which i store some class names and members i want to run from a dll file. So i have a dll with some functions. I can run those functions via Reflection. This is easy. Im wondering if there is a way so i can change my application during runtime. Lets say - i have an object in my scene that takes an argument. I want to be able to give that argument via my dll-file at runtime. Is that posible? For instance. I want to be able to make in windows via a class a cube with opengl. When i run my unity application i want that cube to appear in my scene. How can i do that?
Hope somebody understands me.

Thanks alot!

Do you mean you want to generate executable code at runtime? You can do this with Reflection.Emit. Jesse Liberty’s book “Programming C#” (by O’Reilly) has a good chapter explaining how to use this class. You will need to get the details of the CIL opcodes from somewhere else, however. “CIL Programming: Under the Hood of .NET” by Jason Bock is not a very good book on the whole, but it does have a reasonable reference section for the opcodes. There may be other places you can get this information, but I don’t know of any off hand.