long number = …;
// string should contain exactly 12 characters
string leastSignificant48bitsOfNumberAsHex = number.ToString("????")
long number = …; // string should contain exactly 12 characters string leastSignificant48bitsOfNumberAsHex =
Share
You can do it with string formatting:
This will fill up the string with zeroes if the number is shorter.