Esempio n. 1
0
        public static uint256 Parse(string hex)
        {
            var ret = new uint256();

            ret.SetHex(hex);
            return(ret);
        }
Esempio n. 2
0
		public static bool TryParse(string hex, out uint256 result)
		{
			if(hex == null)
				throw new ArgumentNullException("hex");
			result = null;
			if(hex.Length != WIDTH_BYTE * 2)
				return false;
			if(!((HexEncoder)Encoders.Hex).IsValid(hex))
				return false;
			var ret = new uint256();
			ret.SetHex(hex);
			result = ret;
			return true;
		}
Esempio n. 3
0
        public static bool TryParse(string hex, out uint256 result)
        {
            if (hex == null)
            {
                throw new ArgumentNullException("hex");
            }
            result = null;
            if (hex.Length != WIDTH_BYTE * 2)
            {
                return(false);
            }
            if (!((HexEncoder)Encoders.Hex).IsValid(hex))
            {
                return(false);
            }
            var ret = new uint256();

            ret.SetHex(hex);
            result = ret;
            return(true);
        }
Esempio n. 4
0
		public static uint256 Parse(string hex)
		{
			var ret = new uint256();
			ret.SetHex(hex);
			return ret;
		}