"Check parameter for null" generates if without braces as configured
Having:
ReSharper > Options > Code Editing > C# > Code Style > Braces > 'In single-statement "if-else"' = Required
When using "Check parameter for null", it generates invalid code:
if (a == null)
throw new ArgumentNullException("a");
... instead of expected:
if (a == null)
{
throw new ArgumentNullException("a");
}
... this drives me bit crazy, can't find other settings affecting this, code template, anything :) I would much appreciate if anyone could point me where to set correct/expected behavior.
I'm using ReSharper 10.1 EAP, VS 2015 - 14.0.24720.0
Please sign in to leave a comment.
After today's update, issue is gone (updated to 2016.1 EAP 8).
Having this problem, except everything gets placed on one line.
Example:
if (a == null) throw new ArgumentNullException("a")
JetBrains ReSharper Ultimate 2016.1 Build 105.0.20160414.153548
ReSharper 2016.1.20160414.155411