"Wilde" <Wilde (AT) discussions (DOT) microsoft.com> wrote
Quote:
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);
}
}