Solved

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

Posted on 2012-03-27
3
530 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
Need to grow your business through quality cloud solutions? With everything required to build a cloud platform and solution, you may feel like the distance between you and the cloud is quite long. Help is here. Spend some time learning about the Con…

932 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now