A
ArmsTom
I was using structures to store information read from a file. That was
working fine for me, but then I read that anything stored in a
structure is added to the stack and not the heap. So, I made a class
that stores the same information.
The user selects any number of records from the file when the program
loads & can then make changes. The records the user selects are added
to an array and changes are made to the records in that array and then,
when the user saves the information, I update the collection that
records were first pulled from (that is, the collection populated when
the program loads, using the info from the file).
However, since classes are reference types the information is updated
the moment a change is made. I don't really want this. Any thoughts?
Is there a better way of storing/editing the info pulled from the file
other than storing it all in a collection (or array)? Or maybe not
"better" but just someone else's preference.
Thanks.
working fine for me, but then I read that anything stored in a
structure is added to the stack and not the heap. So, I made a class
that stores the same information.
The user selects any number of records from the file when the program
loads & can then make changes. The records the user selects are added
to an array and changes are made to the records in that array and then,
when the user saves the information, I update the collection that
records were first pulled from (that is, the collection populated when
the program loads, using the info from the file).
However, since classes are reference types the information is updated
the moment a change is made. I don't really want this. Any thoughts?
Is there a better way of storing/editing the info pulled from the file
other than storing it all in a collection (or array)? Or maybe not
"better" but just someone else's preference.
Thanks.