Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 562
  • Last Modified:

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

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
ziorinfo
Asked:
ziorinfo
  • 2
1 Solution
 
BuggyCoderCommented:
UInt32 val = 12316667;
var data = val.ToString("X");

Open in new window

0
 
ziorinfoAuthor Commented:
will it give me 8 byte long hex value always ?
0
 
BuggyCoderCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now