c# - Difference between (long)value and Convert.ToInt64(value) -
i've procedure gets value database dataset , copy local long typed
variable. contains long value
.
this how i'm copying value dataset variable.
areaid = dstable.searchedtable[i].isareaidnull() ? 0 : (long)dstable.searchedtable[i]["areaid"];
sometimes works fine gives me error
specific cast not valid
then have change these kind of conversion format
areaid = dstable.searchedtable[i].isareaidnull() ? 0 : convert.toint64(dstable.searchedtable[i]["areaid"]);
i'm confused what's wrong (long) when has same value both methods , 65. i'm missing on here??
Comments
Post a Comment