"J. van Herten" <kj*********@hjklfio8uaysdf.nhakjsh> wrote in
news:eY**************@tk2msftngp13.phx.gbl:
I am searching for the replacement of the scriptcontrol of VB6
in .NET. I am plaing with the CodeDOM but I cannot get to
evaluate a string text to the result I want.
String text = "1 + 2"
Result shoul be 3.
For simple math expressions, you can use JScript.Net's Eval()
function. It may be easiest to write a small assembly in JScript.Net
that exposes a method that calls Eval(), and use that assembly in
your C# or VB.Net app.
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/