我有一堂课:
public class Member
{ public string header {get;set;}
public List<Member> MemberCollection {get;set;}
}
所以我有列表 lstMembers;包含这样的:
MemberA
|_____ header = HeadingMemberA
|
|_____ List<Member> = Member A.1
|___ Member A.2
|___ Member A.3
MemberB
|_____ header = HeadingMemberB
|
|_____ List<Member> = Member B.1
|___ Member B.2
|___ Member B.3
所以现在我必须在每个级别获得第一个成员。
列出成员 A、成员 A.1、成员 B 和成员 B.1