I am looking for a scripting component in .NET 2.0 that can replace the functionality of the COM script control. I am particularly interested in the eval function. Can you help me?
In Powershell you can use the Invoke-Expression cmdlet. At the console type "help Invoke-Expression -full" to get the details. Shay http://scriptolog.blogspot.com > I am looking for a scripting component in .NET 2.0 that can replace > the functionality of the COM script control. I am particularly > interested in the eval function. Can you help me? >
I don't see how this solves my problem. I am looking for a .NET component that I can access in C# that can evaluate mathematical expressions. This looks like command based shell to me..... Did I miss something? "Shay Levi" wrote: > In Powershell you can use the Invoke-Expression cmdlet. > At the console type "help Invoke-Expression -full" to get the details. > > > Shay > http://scriptolog.blogspot.com > > > > > I am looking for a scripting component in .NET 2.0 that can replace > > the functionality of the COM script control. I am particularly > > interested in the eval function. Can you help me? > > > > >
Try http://www.codeproject.com/Purgatory/Expr.asp?df=100&forumid=276649&exp=0&select=2116558 HTH Shay http://scriptolog.blogspot.com > I don't see how this solves my problem. I am looking for a .NET > component that I can access in C# that can evaluate mathematical > expressions. This looks like command based shell to me..... Did I miss > something? > > "Shay Levi" wrote: > >> In Powershell you can use the Invoke-Expression cmdlet. At the >> console type "help Invoke-Expression -full" to get the details. >> >> Shay >> http://scriptolog.blogspot.com >>> I am looking for a scripting component in .NET 2.0 that can replace >>> the functionality of the COM script control. I am particularly >>> interested in the eval function. Can you help me? >>>
I was hoping that Microsoft would provide this type of functionality in the ..NET framework or an add on to the framework. What happened to VSA in 2.0? It's not only the evaluation I am interested in, but also the scripting functionality of the script control. My impression now is that this functionality is totally missing in .NET 2.0. I find that very strange, since this is a very powerful component. Why is VSA removed? And what is the strategy of scripting in .NET? "Shay Levi" wrote: > Try http://www.codeproject.com/Purgatory/Expr.asp?df=100&forumid=276649&exp=0&select=2116558 > > HTH > > > Shay > http://scriptolog.blogspot.com > > > > > I don't see how this solves my problem. I am looking for a .NET > > component that I can access in C# that can evaluate mathematical > > expressions. This looks like command based shell to me..... Did I miss > > something? > > > > "Shay Levi" wrote: > > > >> In Powershell you can use the Invoke-Expression cmdlet. At the > >> console type "help Invoke-Expression -full" to get the details. > >> > >> Shay > >> http://scriptolog.blogspot.com > >>> I am looking for a scripting component in .NET 2.0 that can replace > >>> the functionality of the COM script control. I am particularly > >>> interested in the eval function. Can you help me? > >>> > > >
"Wilde" wrote in message news:36D95B38-C95F-4D88-8520-B8DB306644E1@microsoft.com... >I don't see how this solves my problem. I am looking for a .NET component > that I can access in C# that can evaluate mathematical expressions. This > looks like command based shell to me..... Did I miss something? > You can call PowerShell like this: using (RunspaceInvoke ri = new RunspaceInvoke()) { Collection<PSObject> results = ri.Invoke("2 + 2"); Console.WriteLine("Result:"); foreach (PSObject po in results) { Console.WriteLine(po.BaseObject); } }