Microsoft.Scripting.Math.BigInteger.AsUInt64 C# (CSharp) Method

AsUInt64() private method

private AsUInt64 ( ulong &ret ) : bool
ret ulong
return bool
    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;
    }

Usage Example

コード例 #1
0
ファイル: Converter.cs プロジェクト: gregmalcolm/ironruby
 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");
 }
All Usage Examples Of Microsoft.Scripting.Math.BigInteger::AsUInt64