KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
If I wanted to fill a structure from a binary file, I would use something like this: using (BinaryReader br = new BinaryReader(File.Open(filename, FileMode.Open))) { myStruct.ID = br.ReadSingle(); myStruct.name = br.ReadBytes(20); } However, I must read the whole file into a byte array before deserializing, because I want to do some pre-processing. Is there any managed way to fill my structure from the byte array, preferably similar to the one above?
Tags (comma-separated)
Save Edits
Cancel