Eval / Execute in vb.NET 
Author Message
 Eval / Execute in vb.NET

I have existing code which uses "Execute" to implement a method of a class.

The flavour of the code is

Public Sub Something(Parameter)
.......

If .... Then
 Execute Me.Formula
End If

End Sub

Where Me.Formula is taken from a persistent store.

How do I achieve this in VB.NET?

Mike Gale.



Fri, 30 Jul 2004 04:16:45 GMT  
 Eval / Execute in vb.NET
Just found an article that I hope is out of date (and the decision has
changed):

Introducing JScript .NET
Andrew Clinick

One caveat to this merging of the two languages is that a small number of
VBScript features-such as Eval and the Execute functions-are not available
in the first release of Visual Basic .NET. Although it may seem like we've
thrown the baby out with the bathwater here, and destroyed the notion of
Visual Basic .NET as a "dynamic" scripting language, that's not really the
case.

From an article middle of 2001.

If this is true do I throw VB.NET away and upgrade to JScript.NET or
worse...

Mike.



Fri, 30 Jul 2004 08:38:28 GMT  
 Eval / Execute in vb.NET
Mike,
  I was wondering the answer to the same question and did not get any good
answers.  The only thing I heard that I thought might work was to create a
component in JScript.Net that just evaluates the formula and returns the
results however you need them.  You can then use this component in VB.Net or
C# or whatever.  You only need JScript.Net for the one little piece.  Not
sure if that helps you or not.  If you do hear of or figure out a better
way, please let me know or post to the discussion.

- Joe


Quote:
> Just found an article that I hope is out of date (and the decision has
> changed):

> Introducing JScript .NET
> Andrew Clinick

> One caveat to this merging of the two languages is that a small number of
> VBScript features-such as Eval and the Execute functions-are not available
> in the first release of Visual Basic .NET. Although it may seem like we've
> thrown the baby out with the bathwater here, and destroyed the notion of
> Visual Basic .NET as a "dynamic" scripting language, that's not really the
> case.

> From an article middle of 2001.

> If this is true do I throw VB.NET away and upgrade to JScript.NET or
> worse...

> Mike.



Fri, 30 Jul 2004 22:37:37 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Simulate VBScripts Execute and Eval in VB?

2. Eval function in VB .Net and C#

3. Eval() in VB.NET ??

4. Eval Function in VB.NET

5. EVAL function in VB.NET - where is it?

6. JScript.Eval in VB.NET

7. Does VB.NET has Eval Function?

8. Eval Function in VB.NET

9. Executing code that is stored in a table, Eval() function

10. execute a variable as a function/sub procedure (like eval function in java(script))

11. execute and eval

12. execute() and eval()

 

 
Powered by phpBB® Forum Software