C# Other Hints
Use this settings page to configure other kinds of inlay hints in C#.
Code annotations for parameter declarations
This kind of hints shows JetBrains code annotation attributes used in base classes on overriding and implementing members:
![JetBrains Rider: Inlay hints. code annotations JetBrains Rider: Inlay hints. code annotations](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_annotations.png)
Use the Visibility selector to choose how inlay hints for code annotation should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.
Missing constructs
You can display missing returns in functions and missing breaks in switch statements using inlay hints. This lets you immediately understand what exactly is missing:
![JetBrains Rider Inlay hints: missing return JetBrains Rider Inlay hints: missing return](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_missing_return.png)
Use the Visibility selector to choose how inlay hints for missing constructs should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.
[MustDisposeResource] annotations
If you are using the [MustDisposeResourceAttribute] from JetBrains.Annotations to enforce resource disposal in the calling code, JetBrains Rider helps you visually identify constructors and factory methods that return a disposable resource:
![JetBrains Rider Inlay hints: MustDisposeResourceAttribute JetBrains Rider Inlay hints: MustDisposeResourceAttribute](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_MustDisposeResourceAttribute.png)
Use the Visibility selector to choose how inlay hints for [MustDisposeResource] annotations should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.
Implicit dispose points
You can use inlay hints to see places where resource variables are disposed:
![JetBrains Rider Inlay hints: disposed resource variable JetBrains Rider Inlay hints: disposed resource variable](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_dispose.png)
Use the Visibility selector to choose how inlay hints for implicit dispose points should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.
Tuple component names
You can see tuple component names as inlay hints when those names are not apparent from the component expression:
![JetBrains Rider: Inlay hints for tuple component names JetBrains Rider: Inlay hints for tuple component names](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_tuple_component_names.png)
Use the Visibility selector to choose how inlay hints for tuple components should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.
Deconstruction pattern component names
Inlay hints can greatly improve the readability of a deconstruction pattern by showing the declared names of its components:
![JetBrains Rider: Inlay hints for deconstruction pattern component names JetBrains Rider: Inlay hints for deconstruction pattern component names](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_deconstruction_pattern.png)
Use the Visibility selector to choose how inlay hints for deconstruction pattern components should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.
Discard type names
When a method returns more variables than needed, and some are discarded with _
, inlay hints can help you see what is discarded. By default, hints for discards work with push-to-hint:
![JetBrains Rider: Inlay hints for discard names JetBrains Rider: Inlay hints for discard names](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_discrards.png)
Use the Visibility selector to choose how inlay hints for deconstruction pattern components should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.
Descriptions for warnings disabled or restored with #pragma directives
#pragma warning
directives allow you to disable and restore specific warnings by their ID. It is hard to remember what each ID means, therefore JetBrains Rider can add inlay hints with warning descriptions. Note that this kind of hints only work with compiler warnings, whose IDs start with CS
.
![JetBrains Rider: Inlay hints for '#pragma warning' directives JetBrains Rider: Inlay hints for '#pragma warning' directives](https://resources.jetbrains.com/help/img/rider/2024.1/inlay_hints_pragma.png)
Use the Visibility selector to choose how inlay hints for #pragma directives should be displayed in the editor: choose Default to apply the general visibility preference from the page of JetBrains Rider settings , choose Show Always or Never Show to always show or hide hints, or choose Push-to-Hint to hide the hints by default but show them when you press and hold Ctrl.