I have a list that contains a list of objects:
public QuestionScores { public string QuestionReference { get; set; } public int StudentScore { get; set: } public int QuestionScore { get; set; }}
the list contains objects with the same Question Reference:
{ "U1C1", 1, 4 }{ "U1C1", 3, 4 }{ "U1C2", 2, 4 }
I want to end up with a list like this:
{ "U1C1", 4, 8 }{ "U1C2", 2, 4 }
I want to sum the StudentScore and QuestionScore into a single QuestionReference.Is this possible?