Please Help! Dynamic Allocation of array of structures

  • Thread starter Thread starter RBCC
  • Start date Start date
R

RBCC

Does anyone know how to dynamically allocate array of structures? Or where
Ican find info on this on the web? John
 
Does anyone know how to dynamically allocate array of structures? Or where
Ican find info on this on the web? John


Oh, or better yet - if possible - change your structures to classes and
use an ArrayList...
 
* RBCC said:
Does anyone know how to dynamically allocate array of structures? Or where
Ican find info on this on the web? John

'ReDim Preserve'...
 
Jose,
Because structs will be boxed when you put them into an ArrayList, making it
slightly more difficult to update them.

Classes will not be boxed when they are put into the ArrayList as they are
already reference types, so they are easier to work within an ArrayList.

Remember that an ArrayList is designed to hold Objects (reference types).

Hope this helps
Jay
 
Back
Top