RCS1005: Simplify nested using statement
Properties
Property | Value |
---|---|
Default Severity | Hidden |
Minimum language version | - |
Examples
Example #1
diagnostic.cs
using (var fs = new FileStream("path", FileMode.OpenOrCreate))
{
using (var sr = new StreamReader(fs))
{
}
}
fix.cs
using (var fs = new FileStream("path", FileMode.OpenOrCreate))
using (var sr = new StreamReader(fs))
{
}