JetBrains Rider 2024.1 Help

Code Inspection: Convert Nullable of T to 'T?'

Category

Language Usage Opportunities

ID

ConvertNullableToShortForm

EditorConfig

resharper_convert_nullable_to_short_form_highlighting

Default severity

Suggestion

Language

C#

Requires SWA

No

In C#, it is not necessary to use the full Nullable<T> type name because the language allows you to write T? instead. Consequently, JetBrains Rider offers the option to replace the long type name with the shorthand.

Last modified: 17 April 2024