Inspectopedia 2025.2 Help

Language Usage Opportunities

'if' statement can be rewritten as '?:' expression   New in this release

'if' statement can be rewritten as '?:' expression.

'if' statement can be rewritten as '??' expression   New in this release

'if' statement can be rewritten as '??' expression.

'if' statement can be rewritten as '??=' assignment   New in this release

'if' statement can be rewritten as '??=' assignment.

'if-return' statement can be rewritten as 'return' statement   New in this release

'if-return' statement can be rewritten as 'return' statement.

Append to collection expression   New in this release

Append to collection expression.

Class cannot be instantiated   New in this release

Class cannot be instantiated.

Conditional expression can be rewritten as null-coalescing   New in this release

Conditional expression can be rewritten as null-coalescing.

Convert 'as' expression type check and the following null check into negated pattern matching   New in this release

Convert 'as' expression type check and the following null check into negated pattern matching.

Convert 'as' expression type check and the following null check into pattern matching   New in this release

Convert 'as' expression type check and the following null check into pattern matching.

Convert 'if' statement into 'switch'   New in this release

Convert 'if' statement into 'switch'.

Convert 'Nullable<T>' into 'T?'   New in this release

Convert 'Nullable<T>' into 'T?'.

Convert constructor into member initializers   New in this release

Convert constructor into member initializers.

Convert constructor into primary constructor   New in this release

Convert constructor into primary constructor.

Convert delegate variable into local function   New in this release

Convert delegate variable into local function.

Convert into 'await using' statement or declaration   New in this release

Convert into 'await using' statement or declaration.

Convert into 'using' declaration   New in this release

Convert into 'using' declaration.

Convert into lambda expression   New in this release

Convert into lambda expression.

Convert into static class   New in this release

Convert into static class.

Convert lambda expression into method group   New in this release

Convert lambda expression into method group.

Convert negated 'is' expression into 'is' expression with negated pattern   New in this release

Convert negated 'is' expression into 'is' expression with negated pattern.

Convert property into auto-property   New in this release

Convert property into auto-property.

Convert property into auto-property (when possible)   New in this release

Convert property into auto-property (when possible).

Convert property into auto-property with private setter   New in this release

Convert property into auto-property with private setter.

Convert static method invocation into extension method call   New in this release

Convert static method invocation into extension method call.

For-loop can be converted into foreach-loop   New in this release

For-loop can be converted into foreach-loop.

Foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used   New in this release

Foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used.

Inline 'out' variable declaration   New in this release

Inline 'out' variable declaration.

Inline temporary variable   New in this release

Inline temporary variable.

Introduce optional parameters (non-private accessibility)   New in this release

Introduce optional parameters (non-private accessibility).

Introduce optional parameters (private accessibility)   New in this release

Introduce optional parameters (private accessibility).

Invert 'if' statement to reduce nesting   New in this release

Invert 'if' statement to reduce nesting.

Join null check with assignment   New in this release

Join null check with assignment.

Lambda expression/anonymous method can be made 'static'   New in this release

Lambda expression/anonymous method can be made 'static'.

Lambda expression/anonymous method must be 'static' to avoid allocations   New in this release

Lambda expression/anonymous method must be 'static' to avoid allocations.

Lambda expression/anonymous method must not have captures of the containing context   New in this release

Lambda expression/anonymous method must not have captures of the containing context.

Literal length can be reduced by using verbatim string   New in this release

Literal length can be reduced by using verbatim string.

Loop can be converted into LINQ-expression   New in this release

Loop can be converted into LINQ-expression.

Merge 'and' pattern   New in this release

Merge 'and' pattern.

Merge conditional ?: expression into conditional access   New in this release

Merge conditional ?: expression into conditional access.

Merge negated null/pattern checks into complex pattern   New in this release

Merge negated null/pattern checks into complex pattern.

Merge nested property patterns   New in this release

Merge nested property patterns.

Merge null/pattern checks into complex pattern   New in this release

Merge null/pattern checks into complex pattern.

Merge null/pattern/value checks into 'or'/'and' patterns   New in this release

Merge null/pattern/value checks into 'or'/'and' patterns.

Merge sequential checks into single conditional access check   New in this release

Merge sequential checks into single conditional access check.

Move to existing positional deconstruction pattern   New in this release

Move to existing positional deconstruction pattern.

Move variable declaration inside loop condition   New in this release

Move variable declaration inside loop condition.

Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used   New in this release

Part of foreach loop can be converted into LINQ-expression but another 'GetEnumerator' method will be used.

Part of loop's body can be converted into LINQ-expression   New in this release

Part of loop's body can be converted into LINQ-expression.

Pass string interpolation expression   New in this release

Pass string interpolation expression.

Redundant accessor body   New in this release

Redundant accessor body.

Redundant spread element   New in this release

Redundant spread element.

Replace 'SequenceEqual' with constant pattern   New in this release

Replace 'SequenceEqual' with constant pattern.

Replace 'Slice' with range indexer   New in this release

Replace 'Slice' with range indexer.

Replace 'Substring' with range indexer   New in this release

Replace 'Substring' with range indexer.

Replace 'switch' statement with 'switch' expression   New in this release

Replace 'switch' statement with 'switch' expression.

Replace auto-property with computed property   New in this release

Replace auto-property with computed property.

Replace if statement with null-propagating code   New in this release

Replace if statement with null-propagating code.

Replace object pattern not performing any additional checks with 'var' pattern   New in this release

Replace object pattern not performing any additional checks with 'var' pattern.

Replace ternary expression with 'switch' expression   New in this release

Replace ternary expression with 'switch' expression.

Replace with 'field' keyword   New in this release

Replace with 'field' keyword.

Replace with primary constructor parameter   New in this release

Replace with primary constructor parameter.

Use 'nameof' expression to reference enum member name   New in this release

Use 'nameof' expression to reference enum member name.

Use 'nameof' expression to reference name   New in this release

Use 'nameof' expression to reference name.

Use 'nameof' expression to reference name in part of the string literal   New in this release

Use 'nameof' expression to reference name in part of the string literal.

Use 'nameof' expression to reference type name   New in this release

Use 'nameof' expression to reference type name.

Use 'nameof' expression when registering a DependencyProperty   New in this release

Use 'nameof' expression when registering a DependencyProperty.

Use 'with' expression to copy anonymous object   New in this release

Use 'with' expression to copy anonymous object.

Use 'with' expression to copy record   New in this release

Use 'with' expression to copy record.

Use 'with' expression to copy struct   New in this release

Use 'with' expression to copy struct.

Use 'with' expression to copy tuple   New in this release

Use 'with' expression to copy tuple.

Use alias   New in this release

Use alias.

Use collection expression syntax   New in this release

Use collection expression syntax.

Use compound assignment   New in this release

Use compound assignment.

Use deconstruction   New in this release

Use deconstruction.

Use deconstruction to swap variables   New in this release

Use deconstruction to swap variables.

Use discard assignment   New in this release

Use discard assignment.

Use index from end expression   New in this release

Use index from end expression.

Use object or collection initializer when possible   New in this release

Use object or collection initializer when possible.

Use positional deconstruction pattern   New in this release

Use positional deconstruction pattern.

Use raw string   New in this release

Use raw string.

Use string interpolation expression   New in this release

Use string interpolation expression.

Use type annotation syntax   New in this release

Use type annotation syntax.

Use unsigned right shift operator '>>>'   New in this release

Use unsigned right shift operator '>>>'.

Use UTF-8 string literal   New in this release

Use UTF-8 string literal.

Last modified: 29 July 2025