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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

about enum 3
enum type 3
Enum TypeConverter 3
Enum Question 1
Merge Info From Two Enums 1
enum in constructor 4
enum with underlying type 1
about enum 1

Back
Top