I am calculating mod of value "89001012012341234" using XPathNavigator in C# its not correct.
public object Evaluate(string expression)
{
try
{
var result = base.Evaluate("\"89001012012341234\" mod 97");
**//Value of result=>20**
var result1 = 89001012012341234 % 97;
**//Value of result1=>22**
return result;
}
catch (Exception Exception)
{
}
return null;
}
Value of result and result1 is not same why???
Thanks
Your XPath will be evaulated as
89001012012341234.0 % 97.0
, operands will havedouble
type, notint
. See MOD operator implementation.