Re: Trying to execute something stored in variable
- From: "Cor Ligthert [MVP]" <notmyfirstname@xxxxxxxxx>
- Date: Sat, 22 Apr 2006 10:51:19 +0200
Mike,
Are you person 1001 who tries to make a kind of Office Access Solution, you
change to succeed is probably the same as if you try to make a new
professional Texteditor?
It leads probably to nothing, however have a search in this newsgroup for
all those late binding solutinons using reflection.
Just my idea, maybe it does not help, or in the other hand maybe a lot
saving you a lot of time.
Cor
"Mike TI" <sunsetaaa@xxxxxxxxxxx> schreef in bericht
news:%237CRcQeZGHA.4248@xxxxxxxxxxxxxxxxxxxxxxx
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: Steve_Black
- Re: Trying to execute something stored in variable
- References:
- Trying to execute something stored in variable
- From: Mike TI
- Trying to execute something stored in variable
- Prev by Date: Re: projects in vb.net not relateted to data base
- Next by Date: Re: Debug.Wrile does not appear on the Output Window
- Previous by thread: Trying to execute something stored in variable
- Next by thread: Re: Trying to execute something stored in variable
- Index(es):