evaluate a string

  • Thread starter Thread starter TJS
  • Start date Start date
* "TJS said:
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 """.
 
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.
 
ok, but regardless of the quotes , how can I evaluate the string . VB.net
has no eval function anymore.
 
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.
 
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
 
TJS said:
http://msdn.microsoft.com/library/en-us/cpguide/html/cpconemittingdynamicassemblies.asp
http://msdn.microsoft.com/library/e...gsourcecodedynamicallyinmultiplelanguages.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
 
* "Cor Ligthert said:
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...
 
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
 
Wouldn't CodeDOM work just fine for scripting?

Herfried K. Wagner said:
Mhm... If you want to provide scripting support inside your
application, then eval is useful...
 
Back
Top