harin04
harin04

Reputation: 281

converting Long hexadecimal string to decimal value

I have an extra decimal string, which i have to convert to decimal value. I am doing this now. it works for smaller values , for larger values it fails.

long.TryParse(hexadecimalstringinput, System.Globalization.NumberStyles.HexNumber, null, out convertedValue))

For inputs such as "FFFF_FFFF_FFFF_FFFF_FFFF" it fails. Any alternate approach for this?

Upvotes: 0

Views: 163

Answers (1)

Mihaeru
Mihaeru

Reputation: 533

If you really need to handle such values, take a look on BigInteger: MSDN BigInteger

Upvotes: 1

Related Questions