Is it possible to read an array of structs from binary file in one call?
For example, I have a file containing thousands of vertices:
struct Vector3 { float x, y, z; }
I need C# port for the C++ code:
Vector3 *verts = new Vector3[num_verts];
fread ( verts, sizeof(Vector3), num_verts, f );
Here’s one (of a few) ways: