public bool AsUInt64(out ulong ret) { ret = 0; if (sign == 0) return true; if (sign < 0) return false; if (Length > 2) return false; ret = (ulong)data[0]; if (data.Length > 1) { ret |= ((ulong)data[1]) << 32; } return true; }
internal static UInt64 ToUInt64(BigInteger value) { UInt64 result; if (value.AsUInt64(out result)) { return result; } throw RubyExceptions.CreateRangeError("number too big to convert into System::UInt64"); }