codedom sharing variables and functions

M

Miles

Hi,

I've made some code from lots of examples, that loads in a text file of
vb.net code, compiles it within memory, runs it and returns a value.
Everything is peachy there.

However I cannot 'interact' with anything in my main application, variable
or functions etc.

I've tried lots of things, spent hours on google and havent turned up much.

Is it actually possible?

Cheers

Miles
 
M

Miles

marginally further, found something old and cut this out, which then adds a
reference to where I'm trying to access


objCompilerParameters.ReferencedAssemblies.Add(GetType(DynamicCode.Module1).Assembly.Location)


however I now get "is not accessible in this context because it is private"
 
M

Miles

works for classes will not for modules, is enough for me at the moment, if
anyone knows how to do it for modules also, that'd be great
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top