UInt32 datatype doesn't work

Topics: General
Oct 7, 2013 at 3:19 PM
Hello

I would like to evaluate uint32 data types.
But the following example fails with an OverflowException:

[Test]
void TestUInt32_0()
{
var expr = new NCalc.Expression("[x] == 4294967295");
expr.Parameters["x"] = UInt32.MaxValue;
Assert.IsTrue(expr.Evaluate());
}

And this example returns always false:

[Test]
private void TestUInt32_1()
{
uint value = 3294967295;
var expr = new NCalc.Expression("[x] == 3294967295");
expr.Parameters["x"] = value;
Assert.IsTrue(expr.Evaluate());
}

Can anyone help me!

Thanks!