C# Type Name Hints
Use this settings page to configure inlay hints for type names at variables and expressions.
General
Use compact type name presentation | Sometimes type names can be too long. For example, an anonymous type with a few fields will look like this: When this option is enabled, a shortened type name is displayed in the hint. You can hover over the hint to see the full type name. |
Hide if type name is evident from variable name | This option hides type name hints in cases similar to the following one: |
Method return type
These hints will appear after functions if the next function in the chain is written in a new line:
Visibility | Use the selector to choose how inlay hints for function return type should be displayed in the editor: choose Default to apply the general visibility preference from the page of ReSharper options , 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. |
Include property, field and variable accessors in invocation chain | |
Hide for single invocations and one-line method chains | This option hides return type hints for single functions and one-liner chains. |
Hide for the last invocation when hint is irrelevant | This option hides an irrelevant return type hint for the last invocation. |
Join hints for sequences of method invocations with the same return type | This option hides repetitive return types in a sequence of invocations. |
Mode | Choose whether method return type hints should be shown for the first or last invocation in a sequence. |
Implicitly typed variables
This kind of hints lets you display type names for var
s.
Visibility | Use the selector to choose how type name hints for implicitly typed variables should be displayed in the editor: choose Default to apply the general visibility preference from the page of ReSharper options , 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. |
Hide if type of variable is evident | This option is enabled by default so that hints of this kind will not appear where they are not necessary for understanding the type. For more information, which cases ReSharper considers evident, see Use 'var' when evident: what is considered evident?. |
Pattern matching expressions
This kind of hints lets you show type names for var
s, recursive patterns, and tuples in C# pattern matching expressions. For example:
Use the Visibility selector to choose how type name hints for pattern matching expressions should be displayed in the editor: choose Default to apply the general visibility preference from the page of ReSharper options , 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.
Lambda expression parameters
This kind of hints displays type names after parameters of lambda expressions.
Visibility | Use the selector to choose how type name hints for implicitly typed variables should be displayed in the editor: choose Default to apply the general visibility preference from the page of ReSharper options , 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. |
Hide if types of parameters are evident | This option is enabled by default so that hints of this kind will not appear where they are not necessary for understanding the type. For more information, which cases ReSharper considers evident, see Use 'var' when evident: what is considered evident?. |
LINQ range variables
This kind of hints displays type names in LINQ expressions.
Use the Visibility selector to choose how type name in LINQ expressions should be displayed in the editor: choose Default to apply the general visibility preference from the page of ReSharper options , 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.
Target typed new expressions
This kind of hints displays type names in target-typed new expressions.
Visibility | Use the selector to choose how type name hints for target-typed new expressions should be displayed in the editor: choose Default to apply the general visibility preference from the page of ReSharper options , 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. |
Hide if target type is evident | This option is enabled by default so that hints of this kind will not appear where they are not necessary for understanding the type. For more information, which cases ReSharper considers evident, see Use 'var' when evident: what is considered evident?. |