Nim199 Posted February 10, 2009 Share Posted February 10, 2009 Hi, for a while now, I have been working on a prgram to execute mathamatics held inside a string, e.g.:"2*(3-8/4)+6"when run returns8I was, however, helping a freind wiht some VBA recently, and it seems that you can use the 'Evaluate' functio to do this. When I tryed this in VB.NET, however, it wasn't recognised as a command.If anyone knows how to utilliase a built in Evaluation function, PLEASE tell me!Thanks! Link to comment Share on other sites More sharing options...
aspnetguy Posted February 11, 2009 Share Posted February 11, 2009 There isn't an Eval function in VB.Net. However there is in JScript.Net. You can create a project in JScript that wraps teh eval function then compile it to an assembly and reference it in your VB project.The process is explained here http://bytes.com/groups/net-vb/353876-poss...e-eval-vbscript Link to comment Share on other sites More sharing options...
Technage Posted February 27, 2009 Share Posted February 27, 2009 Almost every SQL database can also evaluate this for you, or you could ask google http://www.google.com/search?hl=en&q=2...mp;aq=f&oq= . Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.