If I got this right
List courses;
really is
List<string> courses;
and you need to store a student list within a list of courses?
class course
{
private string _CourseName;
public string CourseName{get{return _CourseName;}}
public List<string>students= new List<string>();
public course(string CourseName)
{
this._CourseName = CourseName;
}
}</string></string>
Use this class where you read the courses like this.
List<course>courses = new List<course>();
while(dtr.Read() != false)
{
string a = dtr.GetValue(0).ToString();
courses.Add(new course(a));
}
for(int i =0;i<courses.count;i++)>
{
Console.WriteLine(courses[i].CourseName);
courses[i].students.add("New Student");
}
</course></course>
I´m not sure this is what you want and I just wrote it by hand so it might contain errors.
Hope it helps.