title: How to pass typed DataTable as output parameter to helper method
body: <p>I am learning Typed Dataset,</p>
  
  <p>Have one helper method which takes procedure name &amp; returns DataTable, </p>
  
  <pre><code>public static DataTable ExecuteProcedureReturnDataTable(string procedureName, SqlParameter[] prmArray = null)
          {
              DataTable dt = new DataTable();
              dt = null;
              using (SqlConnection connection = new SqlConnection(Common.GetConnectionString()))
              {
                  SqlCommand command = new SqlCommand();
                  SqlDataAdapter da = new SqlDataAdapter(command);
                  DataSet ds = new DataSet();
                  try
                  {
                      // attempt to open sql connection and exec command
                      connection.Open();
                      command.Connection = connection;
                      command.CommandText = procedureName;
                      command.CommandType = CommandType.StoredProcedure;
                      // add parameters to command if they exist
                      if (prmArray != null)
                      {
                          foreach (SqlParameter p in prmArray)
                          {
                              command.Parameters.AddWithValue(p.ParameterName, p.Value);
                          }
                      }
  
                      da.Fill(ds);
  
                      //Check whether there is table in dataset
                      if (ds != null )
                      {
                          if (ds.Tables.Count &gt; 0)
                          {
                              dt = ds.Tables[0];
                          }
                      }
  
                  }
                  catch (SqlException exSql)
                  {
                      EventLogging.LogEvent("Exception", exSql.ToString());
                      dt = null;
                  }
                  catch (Exception ex)
                  {
                      EventLogging.LogEvent("Exception", ex.ToString());
                      dt = null;
                  }
                  finally
                  {
                      command.Dispose();
                      connection.Dispose();
                  }
              }
              return dt;
          }
  </code></pre>
  
  <p>I have 3-4 different DataTables under my Typed DataSet, I want a Helper function to work for my all typed datatable.
  How Can I pass Typed DataTable as output parameter to this function? 
  I also doubt, is this possible?</p>