Uollano
0
Q:

add items to a class array

class Student
{
    IList<Subject> subjects = new List<Subject>();
}

class Subject
{
    string Name;
    string referenceBook;
}

//Now you can say:

someStudent.subjects.Add(new Subject());
0

New to Communities?

Join the community