Array
I want to create an array contains variables in different class like this codes: internal class Students { public string Stdname; int Credit_hours; int id; string dept; Course []courses; string DateOfBirth; public Students(string name, int id ,string DateOfBirth,Course[]courses) { this.Stdname = name; this.id = id; this.DateOfBirth = DateOfBirth; this.courses = courses; } public void print(Course[] courses, Func<Course, bool> filter, params int[] courseIDs) { Console.WriteLine("|name: "+Stdname+"|ID: "+id+"|The Date Of Birth"+ DateOfBirth +"|Courses:" ); foreach (Course course in courses) { if (filter(course) && courseIDs.Contains(course.CourseId)) { Console.WriteLine("|Course ID: " + course.CourseId + "|Course Name: " + course.CourseName); } } } }