This property returns true for code elements matched by the <CodeCoverage> exclusion section within the .runsettings file provided (if any). No matter the coverage technology used, methods and types tagged with 'System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute' are excluded from coverage statistics. For the VS coverage technology, tagging a method or a type with 'System.Diagnostics.DebuggerNonUserCodeAttribute' or 'System.Diagnostics.DebuggerHiddenAttribute' exclude it also from coverage statistics. You can also specify a custom attribute to excluded elements from coverage statistics in the Project Propeties > Analysis > Coverage > Settings form. Unlike the property , this property returns false for code elements whose coverage data is not available in coverage files provided - but that are not explicitly excluded from coverage.
Requirements
Target Platforms: Windows 11, 10, 8, 7 and Linux, MacOS with net8.0, net7.0 or net6.0 installed