JetBrains Rider
 
Get JetBrains Rider
Get your hands on the new features ahead of the release by joining the Early Access Program for Rider 2025.1! Learn more

Code inspection: Join or separate 'var' in deconstruction declarations

Last modified: 11 February 2024

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

By default, JetBrains Rider will suggest joined notation for multiple var's in deconstruction declarations, for example var (x, y) = GetTuple();. You can select Prefer separate declarations for deconstructed variables on the Editor | Code Style | C# | Syntax Style page of JetBrains Rider settings to opt for separate notation, for example (var x, var y) = GetTuple();.