title: Using DataTables and storing values
body: <p>I am new to c#.net.
  i have a method where i pass parameters in a loop and for each parameter there are different rows returned .
  rows (which have data of different data types) from database.
  I want to store that data rows somewhere like arraylist. and use for furthue peocessing.</p>
  
  <h2>Plz tell me how to do this. <code>enter code here</code></h2>
  
  <p>/*ideally Get_ChildAndParentInfo(int pointid) function returns  array list but how to deal with array list containing datarows with different data types */</p>
  
  <pre><code>public static ArrayList Get_ChildAndParentInfo(int PointID) 
      {
          string Sp_name = "USP_Get_Parents";
          SqlParameter[] Parameters = new SqlParameter[1];
          Parameters[0] = new SqlParameter("@IntPointId", DbType.Int32);
          DataTable dtChildInfo = new DataTable();
          ArrayList ChildNParents = new ArrayList();
          ArrayList Collect = new ArrayList();
  
          int i = 0;
  
  
          Parameters[0].Value = PointID;
                dtChildInfo = DataLayer.getdata1(Sp_name, Parameters);
  
              //  for (i = 0; i &lt; dtChildInfo.Rows.Count; i++)
              //  {
              //      ArrayList temp = new ArrayList();
              //      for (int j = 0; j &lt; dtChildInfo.Columns.Count; j++)
              //      {
              //          temp.Add(dtChildInfo.Rows[0][j]);
              //      }
              //      //Collect[i] = temp;
              //      Collect.Insert(i, temp);
              //      temp.Clear();
              //}
  
  
                //PrintValues(Collect);
          return (Collect);
      }
      public static ArrayList send_SMS() **///ENTRY POINT FUNCTION**
      {
  
          ArrayList Points = new ArrayList();
          DataTable PathInfo = new DataTable();
          ArrayList ParentInfo = new ArrayList();
          PathInfo = Get_ActivePath(); 
          Points = GetPoints(PathInfo);**//returns 6,3**
          for (int i = 0; i &lt; Points.Count; i++)
          {
              //ParentInfo = Get_ChildAndParentInfo();
  
              ParentInfo = Get_ChildAndParentInfo(Convert.ToInt32(Points[i]));
  
             PrintValues(ParentInfo);
          }
  
  
          return ParentInfo;
  
      }
  </code></pre>