Evaluating an expression in a string?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Anyone know how I can do this? No eval function in VB.Net unfortunatley

Dim strExpression As string = "itemsPurchased>5
If eval(strExpression) The
giveDiscount(
End I
 
* "=?Utf-8?B?RGl0Y2hpdA==?= said:
Anyone know how I can do this? No eval function in VB.Net unfortunatley.

Dim strExpression As string = "itemsPurchased>5"
If eval(strExpression) Then
giveDiscount()
End If

Samples:

<http://www.codeproject.com/useritems/evaluator.asp>
<http://www.codeproject.com/csharp/livecodedotnet.asp>

If you have a DevX account:

<http://www.devx.com/codemag/Article/10352/0/page/1>

--
Herfried K. Wagner
MVP · VB Classic, VB.NET
<http://www.mvps.org/dotnet>

<http://www.plig.net/nnq/nquote.html>
 
Back
Top