April 22, 2006
Thank you for your reply. I found the example very difficult to understand
as I am very new to VB.Net.
Incidently, I read about the System.CodeDom namespace in MSDN, however I am
unable to get the example given to work. Does this do what I have in mind ?
*****
Dim start As New CodeEntryPointMethod()
Dim cs1 As New CodeMethodInvokeExpression( _
New CodeTypeReferenceExpression("System.Console"), _
"WriteLine", _
New CodePrimitiveExpression("Hello World!") )
start.Statements.Add(cs1)
*****
Please assist
Mike Ti
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
"Mike TI" <su*******@hotmail.com> schrieb: How can I execute something stored in a variable.
For example, I want to store:
UserControl1.Show() or
UserControl2.Show()
in a variable and then execute whatever is in that variable.
Dynamic compilation:
Build a Custom .NET "EVAL" Provider
<URL:http://www.eggheadcafe.com/articles/20030908.asp>
Runtime Compilation (A .NET eval statement)
<URL:http://www.codeproject.com/dotnet/evaluator.asp>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>