vb.net - Which .NET data structure should I use? -


Here is the structure of the data, my object will need to be exposed (the data is not actually stored in XML, it just The easiest way to describe the layout):

  & lt; Section id = "accounting" & gt; & Lt; Employee id = "1234" & gt; Joe Jones & lt; / Staff & gt; & Lt; Employee id = "5678" & gt; Steve Smith & lt; / Staff & gt; & Lt; / Department & gt; & Lt; Department ID = "Marketing" & gt; & Lt; Employee id = "3223" & gt; Kate Connors & lt; / Staff & gt; & Lt; Employee id = "3218" & gt; Noble Washington & lt; / Staff & gt; & Lt; Employee id = "3233" & gt; James Thomas & lt; / Staff & gt; & Lt; / Department & gt;  

When I de-serialize the data, how should I show my properties in terms of properties? If it were just department and employee IDs, then I think I would use a dictionary but I also need to organize the employee's name.

  class division public id as integer public employee list (employee) End Class Class Employee Public Id as an integer public name string and class  

Something like this (can not remember my VB syntax). Be sure to use the members of the Properties vs. Public ...


Comments