Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Here's what I want to do,

 

I have a compiled assembly of code, which I've used:

myCodeCompiler = dynCompiler.CreateCompiler()
myCompilerResults = myCodeCompiler.CompileAssemblyFromFileBatch(myCompilerParameters, files)

 

Now that I have all of my various files compiled at runtime, I want to throw the code into a parent class. So I have the functionality of being able to write functions/procedures in my files and not have to create a class for them.

Posted

I really doubt this is difficult for anyone familiar with reflection.

 

I just want to force a class to be a subclass of a different class.

Posted

I know it can work, I've seen it done, although I'm not sure how

 

"functionality of being able to write functions/procedures in my files and not have to create a class for them."

  • *Experts*
Posted
You need to create the class programmatically and insert your functionality into the class, and compile the whole thing at once. You can't just inject your code into the compiled DLL.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...