byte[] to enum

  • Thread starter Thread starter J M
  • Start date Start date
J

J M

I have program that query printer status from remote printer server in
byte[] format. Some part of byte[] is in form of enum (integer). How do I
convert to integer list or array or enum? I just need to print the content
of enum.

TIA!
 
J M said:
I have program that query printer status from remote printer server in
byte[] format. Some part of byte[] is in form of enum (integer). How do I
convert to integer list or array or enum? I just need to print the content
of enum.

To go from byte array to integer, use BitConverter. If the endianness
is wrong, use my EndianBitConverter class at
http://www.pobox.com/~skeet/csharp/miscutil
 
Back
Top