public static uint256 Parse(string hex) { var ret = new uint256(); ret.SetHex(hex); return(ret); }
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; }
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); }
public static uint256 Parse(string hex) { var ret = new uint256(); ret.SetHex(hex); return ret; }