On 02/17/2013 12:12 PM, jerro wrote:

> You don't need to cast it each time, you can do something like:
>
> auto structPointer = cast(MyStruct*) byteArray.ptr;

And that pointer can be converted to a D slice:

  MyStruct[] slice = structPointer[0..number_of_struct_objects];

Use 'slice' as a regular D slice from that point on.

Ali

Reply via email to