codedom sharing variables and functions

  • Thread starter Thread starter Miles
  • Start date Start date
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
 
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"
 
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
 
Back
Top