July 8th, 2011, 11:55 AM
Convert Class Object to Struct?
Hi all - is it possible to take a class object (ie, a list), and create a copy of it as a struct?
i have a List<> object (a) that i want to add to another larger list (b), and then clear the list (a) to repeat the procedure.. ideally, getting the larger list of lists (b) containing a whole bunch of (a)s.... but as you probably already figured out, once i clear the list (a), all the data i passed to the larger list (b) gets cleared as well. there are placeholders in the larger list (b) but no data.
is there a way to take a 'frozen snapshot' of the list data (a) to then pass to the larger list? perhaps copying the list as a struct object?
any help is deeply appreciated.
Tags for this Thread
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.