assign byte array to struct or class

C

Christian Havel

Hi,

how can I assign a byte array (read from a device) to a C# class or struct?

Christian
 
J

Jon Skeet [C# MVP]

Christian Havel said:
how can I assign a byte array (read from a device) to a C# class or struct?

You can't (easily) change an existing instance, but you can create a
*new* instance using serialization. See BinaryFormatter for details.
 
C

Christian Havel

Thank you Jon.
Christian

Jon Skeet said:
You can't (easily) change an existing instance, but you can create a
*new* instance using serialization. See BinaryFormatter for details.
 

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

Top