G
Ghada Al-Mashaqbeh via DotNetMonster.com
Hi all,
I am facing a problem in dynamic code generation at run time, the problem
occurs when the dynmaic code use global data exist within the original
application.
Lets say that my application is called "Dynamic Code", so the name space in
my project is "Dynamic Code", I have created "Form1.cs" where my code exist.
Form1 class contain a global class "xarray" with static memeber "x" which is
an array, I want the added dynamic code by the end user to use this array.
I have included "using DynmaicCode;" in the generated dynamic code, in the
assembly references added to the compiler parameters I have written the
Following code:
param.ReferencedAssemblies.Add("Form1.dll"); // param is the copiler
parameters object.
to enable the use of array x in the dynamic code, the above code is written
in Form1.cs, the problem is when compiling the added code the compiler give
me an error that Form1.dll does not found, What shall I do to enable the use
of Global data within the project by the run timr added code???
waiting a reply plz.
Ghada
I am facing a problem in dynamic code generation at run time, the problem
occurs when the dynmaic code use global data exist within the original
application.
Lets say that my application is called "Dynamic Code", so the name space in
my project is "Dynamic Code", I have created "Form1.cs" where my code exist.
Form1 class contain a global class "xarray" with static memeber "x" which is
an array, I want the added dynamic code by the end user to use this array.
I have included "using DynmaicCode;" in the generated dynamic code, in the
assembly references added to the compiler parameters I have written the
Following code:
param.ReferencedAssemblies.Add("Form1.dll"); // param is the copiler
parameters object.
to enable the use of array x in the dynamic code, the above code is written
in Form1.cs, the problem is when compiling the added code the compiler give
me an error that Form1.dll does not found, What shall I do to enable the use
of Global data within the project by the run timr added code???
waiting a reply plz.
Ghada