/// </summary>
public class base_uint : IComparable<base_uint>, IEquatable<base_uint>
{
- protected readonly int nWidth;
+ protected int nWidth;
protected uint[] pn;
public double getDouble()
public uint160()
{
+ base.nWidth = nWidth;
pn = new uint[nWidth];
for (int i = 0; i < nWidth; i++)
public uint160(uint160 b)
{
+ base.nWidth = nWidth;
pn = new uint[nWidth];
for (int i = 0; i < nWidth; i++)
public uint160(ulong n)
{
+ base.nWidth = nWidth;
pn = new uint[nWidth];
pn[0] = (uint)n;
{
Contract.Requires<ArgumentException>(bytes.Length == 20, "Incorrect array length");
+ base.nWidth = nWidth;
pn = Interop.ToUInt32Array(bytes);
}
{
Contract.Requires<ArgumentException>(hex.Length == 40, "Incorrect string");
+ base.nWidth = nWidth;
var bytes = Interop.ReverseBytes(Interop.HexToArray(hex));
pn = Interop.ToUInt32Array(bytes);
}
public uint256()
{
+ base.nWidth = nWidth;
pn = new uint[nWidth];
for (int i = 0; i < nWidth; i++)
public uint256(uint256 b)
{
+ base.nWidth = nWidth;
pn = new uint[nWidth];
for (int i = 0; i < nWidth; i++)
public uint256(ulong n)
{
+ base.nWidth = nWidth;
pn = new uint[nWidth];
pn[0] = (uint)n;
{
Contract.Requires<ArgumentException>(bytes.Length == 32, "Incorrect array length");
+ base.nWidth = nWidth;
pn = Interop.ToUInt32Array(bytes);
}
{
Contract.Requires<ArgumentException>(hex.Length == 64, "Incorrect string");
+ base.nWidth = nWidth;
var bytes = Interop.ReverseBytes(Interop.HexToArray(hex));
pn = Interop.ToUInt32Array(bytes);
}
Output:
+ True
False
False
True
- False
0000000000021173331e7742b51afe6c853158a8881f7ad871f4391a7ddcfa4d
0000000000021173331e7742b51afe6c853158a8881f7ad871f4391a7ddcfa4f
00021173331e7742b51afe6c853158a8881f7ad871f4391a7ddcfa4e00000000