JetBrains Rider 2024.3 Help

Code inspection: Use preferred style for discard declaration

This inspection checks the code style for using 'var' in declarations.

By default, JetBrains Rider suggests using standalone _ for discards, for example (_, _) = (0, 1);. You can select Use 'var' keyword for discards on the Editor | Code Style | C# | Syntax Style page of JetBrains Rider settings to always use var with discards where appropriate thus making sure that there are no conflicts with variables in the scope that may be named _.

Last modified: 11 February 2024