从可观察的集合中获取特定项目的索引-UWP C#

时间:2018-07-18 07:01:00

标签: c# uwp observablecollection

我想从我的可观察集合中获取特定项目的索引。我有一个像下面这样的课程。

namespace TestClass
{
public class ClassRoomList
{
public int ClassID{ get; set; }
public ObservableCollection<CurrentStudentsList> CurrentStudentsArray { get; set; }
}

public class CurrentStudentsList
{
public string StudentName { get; set; }
public string StudentID { get; set; }
public ObservableCollection<StudentsMarksList> StudentsMarksArray { get; set;            }

}
public class StudentsMarksList
{
public string MarkInEnglish { get; set; }
public string MarkInMaths{ get; set; }
}

我的可观察集合定义为

 public static ObservableCollection<ClassRoomList> _ClassRoomList = new ObservableCollection<ClassRoomList>();

如何获取具有StudentID = 555的StudentMarksArray的索引?

0 个答案:

没有答案