Permalink
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (29 sloc) 945 Bytes

RCS1005: Simplify nested using statement

Property Value
Id RCS1005
Category Simplification
Default Severity Hidden
Enabled by Default
Supports Fade-Out -
Supports Fade-Out Analyzer

Example

Code with Diagnostic

using (var fs = new FileStream("path", FileMode.OpenOrCreate))
{ // RCS1005
    using (var sr = new StreamReader(fs))
    {
    }
}

Code with Fix

using (var fs = new FileStream("path", FileMode.OpenOrCreate))
using (var sr = new StreamReader(fs))
{
}

See Also

(Generated with DotMarkdown)