Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

Hex change Low to High order and then covert it into decimal

$
0
0

I have Hex string like 1480D604. Which I need to change order from Low to High 0x04D68014 and then I need to cast it into decimal value. One approach that I can think is first change their order first like.

Step 1 : 14-80-D6-04 --> 04-D6-80-14

How can I change this order from Low to High order in hex value.

Step 2

Cast output from first step into decimal value like this

int decValue = int.Parse(hexValue, System.Globalization.NumberStyles.HexNumber);

0x04D68014=81166356

Is there any simple way to achieve this in single step.


Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>