I am trying to ensure my coding follows correct disposal of objects so I am enforcing these rules as errors. But I am having trouble with this section of code
If you dispose the StreamReader, you are also disposing the underlying stream.
If you comment out objStream.Dispose() then you run into the chance of something throwing an exception before you even get to the nested try block - which will result in your stream not getting disposed.
There's a nice explanation here: Does disposing streamreader close the stream?