如何创建父对象列表,每个父对象可以拥有一个子对象列表? [英] How to create a list of parent objects where each parent can have a list of child objects?

查看:212
本文介绍了如何创建父对象列表,每个父对象可以拥有一个子对象列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在VB.NET 2010中,如何创建父类列表,每个父类都有自己的子类列表.子类列表中的子对象可能少至1个,或者多达数百个子对象?

In VB.NET 2010, How would one go about creating a list of Parent classes where each Parent has it's own list of Child classes. Where the list of child classes could be as few as 1 child or as many as a few hundred child objects?

推荐答案

Dim ChildList as generic.list(of object)
Dim ParentList as generic.list(of ChildList)

您可以像上面一样

这篇关于如何创建父对象列表,每个父对象可以拥有一个子对象列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆