When running Code Analysis on my project I get the following warning:CA2202 : Microsoft.Usage : Object 'fs' can be disposed more than once in methodI don't see the problem, and the code compiles fine and produces the expected results in all test cases. If I remove the fs.Dispose(); statement then Code Analysis instead produces this warning:object 'fs' is not disposed along all exception paths. Call System.IDisposable.Dispose on object 'fs' before all references to it are out of scope.I am much grateful if you can review my code so that I can learn the proper way of disposing resources.    private string ReadFileContent(string filename, Encoding encoding, string category, FileArchive archiveConfig)    {        FileStream fs = null;        StreamReader sr = null;        string fileContent = string.Empty;        _logger.Debug(Reading file content of \ + category + \ file \ + filename + \);        try        {            fs = new FileStream(filename, FileMode.Open, FileAccess.ReadWrite, FileShare.None, 64 * 1024, FileOptions.SequentialScan);            fs.Position = 0;            sr = new StreamReader(fs, encoding, true);            fileContent = sr.ReadToEnd();        }        catch (Exception)        {            ArchiveFile(filename, archiveConfig.ErrorFolder, category, _logger);            throw;        }        finally        {            if (sr != null)                sr.Dispose();            if (fs != null)                fs.Dispose();         }        return fileContent;    }
MS CA2202: Object can be disposed more then once
c#;memory management