```
public ArrayList P2a(string sql)
{
    ArrayList result = new ArrayList();

    MySqlCommand cmd = new MySqlCommand();
    MySqlConnection mysqlconnection = new MySqlConnection(xxx);
    cmd.Connection = mysqlconnection;
    cmd.CommandText = sql;
    try
    {
        cmd.Connection.Open();
        MySqlDataReader reader = cmd.ExecuteReader();
        while (reader.Read())
        {
            Dictionary<string, object> dict = new Dictionary<string, object>();
            for (int count = 0; (count <= (reader.FieldCount - 1)); count++)
            {
                dict.Add(reader.GetName(count), reader[count]);
            }
                result.Add(dict);
        }

        return result;
    } catch {
        return result;
    } finally {
        cmd.Connection.Close();
    }
}

```

C# Visual Studio 2017 MySQL void return echo problem.

I want to make sure that I print out the result properly.

Example:

```
ArrayList query = P2a("select id,site,comment from sites");

MessageBox.Show(query[0]["site"].toString());

```

To use it this way.

Can you make the necessary corrections in the function?