byte.ToString("X2") doesn ot work on MF

Hello

Snowing on Paris today, so stay inside NetMF’ing …

I have an problem with trying to print a byte as hex.

On PC :


byte x = 0xA5;
Console.WriteLine("Value = " + x.ToString("X2"));

works as expected

While on my Panda II


byte x = 0xA5;
Debug.Print("Value = " + x.ToString("X2"));

breaks on an Exception

Any other suggestion to print as hex ?

Thanks

Regarde par ici : http://code.tinyclr.com/project/84/convert-byte-to-hex-string/ :wink:

Look here : http://code.tinyclr.com/project/84/convert-byte-to-hex-string/

Merci collègue :smiley:

It’s a pity that MS stripped this out of NetMF…

I think that hexadecimal display is more for “internal use” to programmers. It’s not meant to be used by customers or end-users.
What about a 0x23 cents cappucino at the coffee dispenser or 0xE6 V at the wall plug ? :slight_smile:

I think this was added to the NET MF 4.2…