I am trying to use nCalc in my application but am running into issues with it wanting to convert to UInt16 for whatever reason and causing an error.
string evalstring = "-.503937 ^ 2";
Expression e = new Expression(evalstring);
this.Value = Convert.ToDouble(e.Evaluate());
This throws;
System.OverflowException occurred
HResult=-2146233066
Message=Value was either too large or too small for a UInt16.
Source=mscorlib
StackTrace:
at System.Convert.ToUInt16(Int32 value)
InnerException: