Solved

How to convert an Unsigned int32 value to 8 byte long hex value.

Posted on 2012-03-27
3
531 Views
Last Modified: 2012-03-27
I have a unsigned int32 value in variable in c# and i need to convert it into 8 byte long hexadecimal value how can i do this
0
Comment
Question by:ziorinfo
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 180 total points
ID: 37775014
UInt32 val = 12316667;
var data = val.ToString("X");

Open in new window

0
 

Author Comment

by:ziorinfo
ID: 37775031
will it give me 8 byte long hex value always ?
0
 
LVL 20

Expert Comment

by:BuggyCoder
ID: 37775038
depends on your input, if length is less than 8 bytes add required number of 0 bytes to it to make it 8 bytes...
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question