Quantcast
Channel: User Lalit - Stack Overflow
Viewing all articles
Browse latest Browse all 34

CA2000 : Microsoft.Reliability object is not disposed along all exception paths

$
0
0

I am getting code analysis error in the below method.

    public static OracleCommand CreateStoredProcedureCommand(string name,                                                             OracleConnection connection)    {        return new OracleCommand(name, connection) { CommandType = CommandType.StoredProcedure };    }

CA2000 : Microsoft.Reliability : In method'StoredProcedureHelper.CreateStoredProcedureCommand(string, OracleConnection)', object 'command' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'command' before all references to it are out of scope

how can it this be resolved without suppressing this?


Viewing all articles
Browse latest Browse all 34

Latest Images

Trending Articles



Latest Images