我应该选用.NET中的哪种数据结构来处理我的数据需求?
- 内容介绍
- 相关推荐
本文共计278个文字,预计阅读时间需要2分钟。
这是我的对象需要公开的数据结构(在数据实际上并不存储在XML中,它只是说明布局的简单方法):Department id=Accounting Employee id=1234 Joe Jones/Employee Employee id=5678 Steve Smith/Employee/Department
这是我的对象需要公开的数据结构(数据实际上并不存储在 XML中,它只是说明布局的最简单方法):<Department id="Accounting"> <Employee id="1234">Joe Jones</Employee> <Employee id="5678">Steve Smith</Employee> </Department> <Department id="Marketing"> <Employee id="3223">Kate Connors</Employee> <Employee id="3218">Noble Washington</Employee> <Employee id="3233">James Thomas</Employee> </Department>
当我对数据进行反序列化时,我应该如何在对象的属性方面公开它?如果它只是Department和EmployeeID,我想我会使用字典.但我也需要关联EmployeeName.
Class Department Public Id As Integer Public Employees As List(Of Employee) End Class Class Employee Public Id As Integer Public Name As String End Class
这样的事情(不记得我的VB语法).务必使用属性与公共成员…
本文共计278个文字,预计阅读时间需要2分钟。
这是我的对象需要公开的数据结构(在数据实际上并不存储在XML中,它只是说明布局的简单方法):Department id=Accounting Employee id=1234 Joe Jones/Employee Employee id=5678 Steve Smith/Employee/Department
这是我的对象需要公开的数据结构(数据实际上并不存储在 XML中,它只是说明布局的最简单方法):<Department id="Accounting"> <Employee id="1234">Joe Jones</Employee> <Employee id="5678">Steve Smith</Employee> </Department> <Department id="Marketing"> <Employee id="3223">Kate Connors</Employee> <Employee id="3218">Noble Washington</Employee> <Employee id="3233">James Thomas</Employee> </Department>
当我对数据进行反序列化时,我应该如何在对象的属性方面公开它?如果它只是Department和EmployeeID,我想我会使用字典.但我也需要关联EmployeeName.
Class Department Public Id As Integer Public Employees As List(Of Employee) End Class Class Employee Public Id As Integer Public Name As String End Class
这样的事情(不记得我的VB语法).务必使用属性与公共成员…

