javascript - System.OverflowException in converting js to C# -
var pin = parseint(form.mac.value.slice(-6), 16) % 10000000;
i'm convert js
c#
this
var pin = convert.toint16(networks[networkindex, 0].substring(networks[networkindex, 0].length - 6)) % 10000000;
and error
an unhandled exception of type 'system.overflowexception' occurred in mscorlib.dll additional information: value either large or small int16.
the value big int16
. try use convert.toint32
.
var pin = convert.toint32(networks[networkindex, 0].substring(networks[networkindex, 0].length - 6)) % 10000000;
Comments
Post a Comment