Blog

Select the correct answer for getting “Quinn”

public class StudentModel { public int Id; public string Name; }

class Program {

static void Main(string[] args) {
var pairs = new Dictionary();
var studentList = new List();
var student = new StudentModel { Id=8014,Name= “Xavier” };
studentList.Add(student);
student = new StudentModel { Id = 7989, Name = “Quinn” };
studentList.Add(student);
student = new StudentModel { Id = 7570, Name = “Luis” };
studentList.Add(student);

foreach (var item in studentList) {
pairs.Add(item.Id, item.Name);
}
}

}