title: Return var from function
body: <p>I am getting values from different tables i var type and I want to return them. What should be the return type of the function:-</p>
  
  <pre><code>  public void getlist()
      {
          try
          {
              using (ShowDataToClientDataContext c = new ShowDataToClientDataContext())
              {
                 var recList = (from record in c.GetTable&lt;T_RECORDSHOW&gt;()
                                where record.RecordStatus.Equals(RecordStatus.Active)
                                select new
                                {
                                    Student = (from stu in c.T_STUDENTSHOWs
                                               where stu.Id.Equals(record.StudentId)
                                               select stu.Name).Single().ToString(),
                                    Trade = (from t in c.T_TRADESHOWs
                                             where t.Id.Equals(record.TradeId)
                                             select t.Name).Single().ToString(),
                                    SessionId = (from s in c.T_SESSIONSHOWs
                                                 where s.Id.Equals(record.SessionId)
                                                 select s.Name).Single().ToString(),
                                    Month = record.Month.ToString(),
                                    Attendance = record.Attendance.ToString(),
  
                                }).ToList();
                 return recList;
              }
  
          }
          catch
          {
  
          }
      }
  </code></pre>
  
  <p>anybody there to help me?</p>