I'm using C# code analysis and got the following error:
Object 'respStream' can be disposed more than once in method 'QRadarPublisher.AnalyzeResponse(HttpWebResponse)'. To avoid generating a System.ObjectDisposedException you should not call Dispose more than one time on an object.: Lines: 116
And this is the code:
using (Stream respStream = webResponse.GetResponseStream())
{
using (var tStreamReader = new StreamReader(respStream))
{
try
{
//My Code
}
catch (Exception ex)
{
//My Code
}
}
}//The error is for this brace
How can I solve the error?