FxCop doesn't understand null conditional operator

103 Views Asked by At

Consider this code:

 protected override void Dispose(bool disposing)
 {
     if (disposed)
         return;

     if (disposing)
     {
         activeFile?.Dispose();
         ...

FxCop is identifying this as "CA2213:DisposableFieldsShouldBeDisposed" (for activeFile) because it doesn't seem to understand the ?. operator.

Is there a known minimum version of FxCop that accepts this?

Thanks!

0

There are 0 best solutions below