我想遍历列表集合中的对象的DateTime属性...日期时间对象的计数
例如。树认为,与所有的课程中列出了一个名称下正常工作:
// Sorting on name with the courses beneath it:
// *list* is a List<ClsStandholder>;
private void ShowNameWithCourses()
{
treeViewList.Nodes.Clear();
for (int i=0; i < list.Count; i++) {
treeViewList.Nodes.Add(list[i].name);
for (int j=0; j < list[i].courses.Count; j++) {
treeViewList.Nodes[i].Nodes.Add(list[i].courses[j]);
}
treeviewList.ExpandAll();
}
}
这完美的作品......在那里我有麻烦试图排序日期,通过日期的计数迭代。
for (int j=0; j < list[i].SubscriptionDate. // how do i put some sort of count for this?
似乎没有财产循环输入的所有日期。
什么`list`变量的类型,并且是`SubscriptionDate`财产只是一个'日期时间`? – 2010-12-04 14:34:38