B
BH
Hi all
just learning about .NET list/collections and I'm confused about which type
is best for which job.
Say I have a simple object with 4 data members: ID (an integer), Name
(string), ParentID (integer), and HasChildren (boolean).
This object represents a single member of a hierarchical list.
I'd like to put those objects into a lean and mean .NET collection( or array
or hashtable) that has only a few purposes in life...
1) search for all the objects within that collection where ParentID == 18456
2) copy the set of matching objects to *another* collection for further
usage
3) copy the Name text of each matching object to another widget somewhere
(TreeView or whatever)
Note: For reasons too long to mention here, I need to stay away from things
like DataSets and DataTables.
Seems like a simple exercise, but I'm lost in the forest of various .NET
list-related objects...hard to find info that summarizes what's best for
what kind of jobs.
Any assistance --with direct solution ideas or help/resources/tutorials for
collections -- greatly appreciated.
just learning about .NET list/collections and I'm confused about which type
is best for which job.
Say I have a simple object with 4 data members: ID (an integer), Name
(string), ParentID (integer), and HasChildren (boolean).
This object represents a single member of a hierarchical list.
I'd like to put those objects into a lean and mean .NET collection( or array
or hashtable) that has only a few purposes in life...
1) search for all the objects within that collection where ParentID == 18456
2) copy the set of matching objects to *another* collection for further
usage
3) copy the Name text of each matching object to another widget somewhere
(TreeView or whatever)
Note: For reasons too long to mention here, I need to stay away from things
like DataSets and DataTables.
Seems like a simple exercise, but I'm lost in the forest of various .NET
list-related objects...hard to find info that summarizes what's best for
what kind of jobs.
Any assistance --with direct solution ideas or help/resources/tutorials for
collections -- greatly appreciated.