By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,290 Members | 1,263 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,290 IT Pros & Developers. It's quick & easy.

Convert a String to a VB statement ?

P: n/a
Hi all,

Is it possible to convert a user-entered string to a VB.NET statement, that can then be executed ?

I want to build a small utility that will allow me to enter a VB statement in a textbox, and the result can be output in a Msgbox.

For instance, I have a textbox in which I enter this text:
--------------------------------
TestString.IndexOf(","c, 0)
--------------------------------
(TestString has already been set)

I'm searching for a way to execute this statement in my code. Is it at all possible ?

Any help is appreciated.

Regards,

Cerebrus.

Feb 11 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Cerebrus99" <zo*****@sify.com> schrieb:
TestString.IndexOf(","c, 0)
--------------------------------
(TestString has already been set)

I'm searching for a way to execute this statement in my code. Is it at all
possible ?


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/>

Feb 11 '06 #2

P: n/a
Hi,

Woo ! That's mighty complicated stuff, even though I did understand what is
being done here. Guess I won't be building that "small utility" anytime
soon. ;-)

Thanks for responding with those useful links,

Regards,
Cerebrus.

Feb 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.