We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use explicit type instead of 'var'
Compiler: 4.12.0-3.24470.4 (d799b05) .NET: 9.0.100-rc.1.24452.12 Visual Studio Code: 1.93.1, 38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, x64 C# Extension: v2.49.25 C# Dev Kit Extension: v1.11.11
38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
.editorconfig
csharp_style_var_elsewhere = false:suggestion csharp_style_var_when_type_is_apparent = true:suggestion
var e = E.A; enum E { A }
Use explicit type instead of 'var' (IDE0008)
var
The suggestion is not emitted, as the type is quite apparent.
The suggestion is emitted.
The suggestion is not emitted for these snippets:
var e = default(E);
var e = new E();
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version Used
Compiler: 4.12.0-3.24470.4 (d799b05)
.NET: 9.0.100-rc.1.24452.12
Visual Studio Code: 1.93.1,
38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40
, x64C# Extension: v2.49.25
C# Dev Kit Extension: v1.11.11
Steps to Reproduce
.editorconfig
file that applies to the project:Use explicit type instead of 'var' (IDE0008)
on thevar
keyword.Expected Behavior
The suggestion is not emitted, as the type is quite apparent.
Actual Behavior
The suggestion is emitted.
The suggestion is not emitted for these snippets:
The text was updated successfully, but these errors were encountered: