Calling an Oracle Stored Procedure with C# Code I came across this code in a project I inherited. I am curious if all the nested using statements make sense to anyone else. Also, wondering if this code could not be written in a better/leaner way?

    private static Dictionary&lt;string, List&lt;string&gt;&gt; GetSubscriptionKeyList(string proc)
    {
        var addResults = new List&lt;string&gt;();
        var deleteResults = new List&lt;string&gt;();

        using (var conn = new OracleConnection(conStr))
        {
            conn.Open();
            using (var cmd = new OracleCommand(proc, conn))
            {
                cmd.CommandType = CommandType.StoredProcedure;

                using (var adds = new OracleParameter
                {
                    ParameterName = "p_add",
                    OracleDbType = OracleDbType.RefCursor,
                    Direction = ParameterDirection.Output,
                    Value = DBNull.Value
                })
                {
                    using (var deletes = new OracleParameter
                    {
                        ParameterName = "p_delete",
                        OracleDbType = OracleDbType.RefCursor,
                        Direction = ParameterDirection.Output,
                        Value = DBNull.Value
                    })
                    {
                        cmd.Parameters.Add(adds);
                        cmd.Parameters.Add(deletes);

                        using (var rdr = cmd.ExecuteReader())
                        {
                            while (rdr.Read())
                            {
                                addResults.Add(rdr.GetString(0));
                            }
                            rdr.NextResult();
                            while (rdr.Read())
                            {
                                deleteResults.Add(rdr.GetString(0));
                            }

                        }
                    }
                }
            }
            conn.Close();
        }
        var result = new Dictionary&lt;string, List&lt;string&gt;&gt;
                         {
                             {"Adds", addResults},
                             {"Deletes", deleteResults}
                         };
        return result;
    }
I could see using it for the connection, command and reader since they implement IDisposable and the documentation for them does say to always call Dispose().  

For the parameters it seems not only unnecessary but in my opinion it really decreases readability.  I would kill the using statements for the parameters and make them simple declarations.

For what it's worth, here's how I'd write it.

private static Dictionary&lt;string, List&lt;string&gt;&gt; GetSubscriptionKeyList(string proc)
{

    var result = new Dictionary&lt;string, List&lt;string&gt;&gt;();
    result.Add("Adds", new List&lt;string&gt;());
    result.Add("Deletes", new List&lt;string&gt;());

    using (var conn = new OracleConnection(conStr))
    {
        conn.Open();
        using (var cmd = new OracleCommand(proc, conn))
        {
            cmd.CommandType = CommandType.StoredProcedure;

            cmd.Parameters.Add(new OracleParameter("p_add", OracleDbType.RefCursor, ParameterDirection.Output));
            cmd.Parameters.Add(new OracleParameter("p_delete", OracleDbType.RefCursor, ParameterDirection.Output));

            using (var rdr = cmd.ExecuteReader())
            {
                while (rdr.Read())
                {
                    result["Adds"].Add(rdr.GetString(0));
                }
                rdr.NextResult();
                while (rdr.Read())
                {
                    result["Deletes"].Add(rdr.GetString(0));
                }

            }
        }
        conn.Close();
    }
    return result;
}


Obviously some things are a matter of taste, like whether to declare the parameters on a separate line and whether to keep the initializers there for the dictionary.  (I thought it was more clear to separate them.)