title: Error: 'StudentScore' is a type, which is not valid in the given context
body: <p>Join the two collections and calculate the total score of each student by subject.</p>
  
  <pre><code>public class Student
      {
          public int Id { get; set; }
          public string Name { get; set; }
          public int Age { get; set; }
      }
  
      public class StudentScore
      {
          public int StudentId { get; set; }
          public string Subject { get; set; }
          public int Points { get; set; }
      }
  public class StudentScoress
      {
  
          public static void Main(string[] args)
          {
              var totalscore = from s in Student
                               join ss in StudentScore
                               on s.Id equals ss.StudentId
                               group ss by ss.Subject into sss
                               select new { sss.Name, sss.Subject, sss.Points };
  
              foreach (var ts in totalscore)
              {
                  Console.WriteLine("{0}" + " " + "{1}" + " " + "{2}", ts.Name, ts.Subject, ts.Points);
              }
          }
  
          IEnumerable&lt;Student&gt; student = new List&lt;Student&gt;()
          {
              new Student() {Id=1,Name="Sam",Age=16},
              new Student() {Id=2,Name="Rick",Age=16},
              new Student() {Id=3,Name="Warner",Age=17},
          };
  
          IEnumerable&lt;StudentScore&gt; studentScores = new List&lt;StudentScore&gt;()
          {
              new StudentScore() { StudentId = 1, Subject = "Maths", Points = 54},
              new StudentScore() { StudentId = 1, Subject = "Maths", Points = 32},
              new StudentScore() { StudentId = 1, Subject = "English", Points = 55},      
              new StudentScore() { StudentId = 1, Subject = "English", Points = 54},
              new StudentScore() { StudentId = 1, Subject = "Biology", Points = 32},
              new StudentScore() { StudentId = 1, Subject = "Biology", Points = 27},          
  
              new StudentScore() { StudentId = 2, Subject = "Maths", Points = 44},
              new StudentScore() { StudentId = 2, Subject = "Maths", Points = 37},
              new StudentScore() { StudentId = 2, Subject = "English", Points = 59},  
              new StudentScore() { StudentId = 2, Subject = "English", Points = 64},
              new StudentScore() { StudentId = 2, Subject = "Biology", Points = 42},
              new StudentScore() { StudentId = 2, Subject = "Biology", Points = 67},          
  
              new StudentScore() { StudentId = 3, Subject = "Maths", Points = 53},
              new StudentScore() { StudentId = 3, Subject = "Maths", Points = 72},            
              new StudentScore() { StudentId = 3, Subject = "English", Points = 54},
              new StudentScore() { StudentId = 3, Subject = "English", Points = 59},
              new StudentScore() { StudentId = 3, Subject = "Biology", Points = 87},
              new StudentScore() { StudentId = 3, Subject = "Biology", Points = 34}
          };
      }
  </code></pre>
  
  <p>I'm getting error in LINQ query that 'StudentScore' is a type, which is not valid in the given context. </p>
  
  <p>What I'm missing here. Anyone help me out.  </p>