Home All Groups Group Topic Archive Search About
Author
29 Jun 2005 3:57 PM
Manuel
I'm using Visual Basic 2005, is there a way to run dynamic code?

Ex:
Dim strToRun as String =""
strToRun &= "dim s as string = ""Hello World!""" & vbcrlf
strToRun &= "Messagebox.Show(s)"
[SomeClass].Execute(strToRun)

Author
29 Jun 2005 4:37 PM
Herfried K. Wagner [MVP]
"Manuel" <NoM***@NoMailLand.com> schrieb:
> I'm using Visual Basic 2005, is there a way to run dynamic code?

If you are asking for an 'Eval' method, no, there is no such method.

> Ex:
> Dim strToRun as String =""
> strToRun &= "dim s as string = ""Hello World!""" & vbcrlf
> strToRun &= "Messagebox.Show(s)"
> [SomeClass].Execute(strToRun)

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/>
Author
29 Jun 2005 7:31 PM
Armin Zingler
"Manuel" <NoM***@NoMailLand.com> schrieb
> I'm using Visual Basic 2005, is there a way to run dynamic code?
>
> Ex:
> Dim strToRun as String =""
> strToRun &= "dim s as string = ""Hello World!""" & vbcrlf strToRun
> &= "Messagebox.Show(s)"
> [SomeClass].Execute(strToRun)
>
>

This code is part of which procedure of which class of which assembly?

Armin