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

evaluate a string

P: n/a
TJS
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuItem('Home', '') "

I have tried this with skmmenu as a reference in the compile command but
assembly will not process the string, reporting a boolean error.

http://odetocode.com/Code/80.aspx

also looked here, but can't get the download to deliver the code

http://www.codeproject.com/dotnet/evaluator.asp
Nov 20 '05 #1
Share this Question
Share on Google+
13 Replies


P: n/a
Hi TJS,

What is your goal by this?
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuItem('Home', '') "

Cor
Nov 20 '05 #2

P: n/a
* "TJS" <no****@here.com> scripsit:
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuItem('Home', '') "


That's no valid VB code. The "'" must be """.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3

P: n/a
TJS
the string would actually be created dynamically , substituting values from
another source while in a loop.
The resulting string then needs to be executed to create the object.

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:OC****************@TK2MSFTNGP11.phx.gbl...
Hi TJS,

What is your goal by this?
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuItem('Home', '') "

Cor

Nov 20 '05 #4

P: n/a
TJS
ok, but regardless of the quotes , how can I evaluate the string . VB.net
has no eval function anymore.
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:Ot**************@TK2MSFTNGP09.phx.gbl...
* "TJS" <no****@here.com> scripsit:
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuItem('Home', '') "


That's no valid VB code. The "'" must be """.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #5

P: n/a
"TJS" <no****@here.com> schrieb
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuItem('Home', '') "


That's no valid VB code. The "'" must be """.


ok, but regardless of the quotes , how can I evaluate the string .
VB.net has no eval function anymore.

If you want to compile code, you must have a compiler.

Maybe this helps:
http://msdn.microsoft.com/library/en...assemblies.asp
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #6

P: n/a
"Armin Zingler" <az*******@freenet.de> schrieb

ok, but regardless of the quotes , how can I evaluate the string
. VB.net has no eval function anymore.

If you want to compile code, you must have a compiler.

Maybe this helps:

http://msdn.microsoft.com/library/en...assemblies.asp

Should have been
http://msdn.microsoft.com/library/en...elanguages.asp
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #7

P: n/a
TJS
thanks for replying, but the microsoft library is designed like a
dictionary and is functionally useless for someone like me. I need "how to"
information

I think I'm trying to get to something like this to work:

http://odetocode.com/Code/80.aspx

i've tried this code which works for simple strings but it throws an error
for what I'm trying to do. I've posted same question to the author's page
but no response yet.


"Armin Zingler" <az*******@freenet.de> wrote in message
news:40***********************@news.freenet.de...
"Armin Zingler" <az*******@freenet.de> schrieb

ok, but regardless of the quotes , how can I evaluate the string
. VB.net has no eval function anymore.

If you want to compile code, you must have a compiler.

Maybe this helps:

http://msdn.microsoft.com/library/en...assemblies.asp
Should have been
http://msdn.microsoft.com/library/en...elanguages.asp

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #8

P: n/a
Hi TJS,

Eval function are in my opinion to create mathimatical operations, not for
creating complete programs on line.

What you can think of in (what I have never tried just think about now) is
creating a scripting html page in asp.net, however that is probably a total
different approach.

Just my thought.

Cor
Nov 20 '05 #9

P: n/a
"TJS" <no****@here.com> schrieb
If you want to compile code, you must have a compiler.

Maybe this helps:

http://msdn.microsoft.com/library/en...assemblies.asp

Should have been

http://msdn.microsoft.com/library/en...elanguages.asp
thanks for replying, but the microsoft library is designed like a
dictionary and is functionally useless for someone like me. I need
"how to" information


My only source of information is the MSDN library, so I think it's a good
place to start. Sorry, I have no other sources.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #10

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
Eval function are in my opinion to create mathimatical operations, not for
creating complete programs on line.

What you can think of in (what I have never tried just think about now) is
creating a scripting html page in asp.net, however that is probably a total
different approach.


Mhm... If you want to provide scripting support inside your
application, then eval is useful...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #11

P: n/a
Hi Herfried,

Maybe I did not explain it well, what I mean is that eval is not to create a
complete application however a method, to let the user do more complex
mathimatical things.

Eval is also no scripting support.

By instance you do not create with eval a complete new splash screen just
for fun.

Cor
Eval function are in my opinion to create mathimatical operations, not for creating complete programs on line.


Mhm... If you want to provide scripting support inside your
application, then eval is useful...

Nov 20 '05 #12

P: n/a
* "Cor Ligthert" <no**********@planet.nl> scripsit:
By instance you do not create with eval a complete new splash screen just
for fun.


Full ACK!

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #13

P: n/a
Wouldn't CodeDOM work just fine for scripting?

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:2h************@uni-berlin.de...
* "Cor Ligthert" <no**********@planet.nl> scripsit:
Eval function are in my opinion to create mathimatical operations, not for creating complete programs on line.

What you can think of in (what I have never tried just think about now) is creating a scripting html page in asp.net, however that is probably a total different approach.


Mhm... If you want to provide scripting support inside your
application, then eval is useful...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Nov 20 '05 #14

This discussion thread is closed

Replies have been disabled for this discussion.