, thanks for the time invested at resolving my issue :)
Asked
Active
Viewed 127 times
1
-
Parsing `BigInteger` works just like the other integer types in C#. See duplicates. You may also want to read the answer to [this question](https://stackoverflow.com/questions/26871079/what-is-the-proper-way-to-construct-a-biginteger-from-an-implied-unsigned-hexedi) – Peter Duniho Nov 03 '20 at 19:40
2 Answers
6
You can BigInteger.Parse it with AllowHexSpecifier flag given:
using System.Globalization;
...
string hexa = "292145F2E92145E6B92FAA6A95FF7E6B92145FAA6A22DE192145FAA696043F457306A";
var bigInt = BigInteger.Parse(hexa, NumberStyles.AllowHexSpecifier);
4
Try the BigInteger.Parse static method, and pass either the NumberStyles.HexNumber or NumberStyles.AllowHexSpecifier flag.
Pavel Anikhouski
- 19,922
- 12
- 45
- 57
Ben Voigt
- 269,602
- 39
- 394
- 697