Operator precedence vs braces
in VS 2015 with R# 2017.2 I get a warning for redundant braces for
public static DateTime Round(this DateTime value, TimeSpan interval)
{
var halfIntervalTicks = (interval.Ticks + 1) >> 1;
return value.AddTicks(halfIntervalTicks - ((value.Ticks + halfIntervalTicks) % interval.Ticks));
}
However, if I remove them I get a StyleCop warning SA1407 - any way of reconciling this?
Please sign in to leave a comment.