i have this line I need to write in C#
sprintf(
currentTAG,
"%2.2X%2.2X,%2.2X%2.2X",
hBuffer[ presentPtr+1 ],
hBuffer[ presentPtr ],
hBuffer[ presentPtr+3 ],
hBuffer[ presentPtr+2 ] );
hbuffer is a uchar array.
In C# I have the same data in a byte array and I need to implement this line…
Please help…
Check if this works:
This is another option but less efficient:
[From the top of my head] In C/C++
%2.2Xoutputs the value in hexadecimal using upper case letters and at least two letters (left padded with zero).In C++ the next example outputs
01 61in the console:Using the information above, the following C# snippet outputs also
01 61in the console: