473,776 Members | 1,557 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

evaluate a string

TJS
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuIte m('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
13 1781
Hi TJS,

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

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

Cor
Nov 20 '05 #2
* "TJS" <no****@here.co m> scripsit:
How can I evaluate this string in vb.net

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


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

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
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**********@p lanet.nl> wrote in message
news:OC******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi TJS,

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

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

Cor

Nov 20 '05 #4
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******** ******@TK2MSFTN GP09.phx.gbl...
* "TJS" <no****@here.co m> scripsit:
How can I evaluate this string in vb.net

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


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

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

Nov 20 '05 #5
"TJS" <no****@here.co m> schrieb
How can I evaluate this string in vb.net

" Dim submenu0 As New skmMenu.MenuIte m('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
"Armin Zingler" <az*******@free net.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
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*******@free net.de> wrote in message
news:40******** *************** @news.freenet.d e...
"Armin Zingler" <az*******@free net.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
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
"TJS" <no****@here.co m> 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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3098
by: David Laub | last post by:
I have no problems running the following dynamic XPath evaluator form MSXSL: <msxsl:script implements-prefix="dyn" language="jscript"> evaluate(context, expression) { return context.nextNode().selectNodes(expression);
13
33870
by: Zeng | last post by:
Hello, Please help!!! I've been stuck on this issue for months. I just wonder if there is a way to programmatically evaluate expression strings such as ( ( 3 + 5 ) / 2 ) > 4 --> this should return 0 or false( ( 3 + 6 ) / 3 ) > ( ( 5 + 3 ) / 4 ) --> this should return 1 or trueThanks for any comment or
15
2274
by: Phlip | last post by:
Javascripters: I have an outer page and an inner iframe. The outer page calculates some javascript, and wants the inner frame to run it. The inner frame should hit a page on the same (private) web server, so this is not a cross-site scripting attack. But I would prefer not to taint the target page with any extra logic to do this. (I will if I must.) The calling page has these elements:
2
12347
kadghar
by: kadghar | last post by:
Many people asks if there is a way to write a mathematical expression, writen as a string in a text box, so they can do something like: sub something_click() textbox2.text=eval(textbox1.text) end sub Well, of course it's posible, and can be done with some characters mannaging. This way you can complicate it as much as you want. The way i usualy do it is in 5 simple steps: 1. Create 2 string arrays, and save numbers in one and...
2
5086
by: yarborg | last post by:
This is kind of a weird one and hard to find answers online because of the format of the question. Essentially I want to be able to have a string that looks like this "True AND True AND True" and evaluate that to a boolean which in this case would be True. Another example would be "(True or False) AND True" would be True. The reason for this is that I have a form where the user has to build some logic in a graphical interface. I can evaluate...
0
9628
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9464
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10289
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10061
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5493
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4031
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3622
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2860
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.