Trying to execute something stored in variable
- From: "Mike TI" <sunsetaaa@xxxxxxxxxxx>
- Date: Sat, 22 Apr 2006 13:09:39 +0500
April 22, 2006
Hi all
I want to execute a command stored in a variable, eg I may store:
Form1.Show()
or
Form2.Show()
in the variable and then execute whatever is in the variable.
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
.
- Follow-Ups:
- Re: Trying to execute something stored in variable
- From: Cor Ligthert [MVP]
- Re: Trying to execute something stored in variable
- Prev by Date: Re: Dragging Borderless Forms
- Next by Date: Re: Execute something stored in a variable
- Previous by thread: Debug.Wrile does not appear on the Output Window
- Next by thread: Re: Trying to execute something stored in variable
- Index(es):
Relevant Pages
|
Loading