title: Error CS0161: Not all code paths return a value
body: <p>I have this error. Can anyone tell me why?
  In TA.cs</p>
  
  <pre><code>public class TA
  {
      public TA()
      {
      }
  
      public static DataTable MergeTA()
      {
  
          DataTable myDT = new DataTable();
          myDataTable.Columns.Add("AcadYear", typeof(string));
          myDataTable.Columns.Add("NofGrp", typeof(System.Int16));
          myDataTable.Columns.Add("LecHr", typeof(int));
          ...
          ...
          ...
  
          DataRow myDR = myDT.NewRow();
          myDataRow["AcadYear"] = "2009";
          myDataRow["NoofGrp"] = "2";
          myDataRow["LecHr"] = "1";
          ...
          ...
          ...
  
          myDT.Rows.Add(myDR);
          ***return myDT;*** 
  
      }
  
  }
  </code></pre>
  
  <p>In Display.aspx.cs</p>
  
  <pre><code>...
  ...
  ...
  string strConMethod = TA.MergeTA();
          SqlConnection sqlConMethod = new SqlConnection(strConMethod);
          DataTable haha = new DataTable();
          haha = TA.MergeTA();
  </code></pre>