title: IEnumerable<IDataRecord> comparison
body: <p>I've got the following method : </p>
  
  <pre><code>public static IEnumerable&lt;IDataRecord&gt; DbQueryToArray(string connectionString, string sql)
      {
          if (null == sql)
              throw new ArgumentNullException(nameof(sql));
  
          string SqlCString = connectionString;
  
          using (SqlConnection connection = new SqlConnection(SqlCString))
          {
              connection.Open();
              if (connection == null)
                  throw new Exception("Db's down.");
  
              using (SqlCommand command = new SqlCommand(sql, connection))
              {
                  using (SqlDataReader reader = command.ExecuteReader())
                  {
                      while (reader.Read())
                      {
                          yield return reader as IDataRecord;
                      }
                  }
              }
              if (connection != null)
                  connection.Close();
          }
      }
  </code></pre>
  
  <p>So I'm collecting the Db tables data into 2 separate arrays:</p>
  
  <pre><code>var table_1 = DbQueryToArray(SQL_Conn_String.ConnString, query1);
  
  var table_2 = DbQueryToArray(SQL_Conn_String.ConnString, query2);
  </code></pre>
  
  <p>What would be the most efficient way and simplest to output the difference/s between the 2 arrays ? </p>
  
  <p>Thanks</p>