RCS1009: Use explicit type instead of 'var' (foreach variable)
WARNING
This analyzer is obsolete. Use RCS1264 instead.
Properties
Property | Value |
---|---|
Default Severity | disabled by default |
Minimum language version | - |
Examples
Example #1
diagnostic.cs
var items = new List<string>();
// ...
foreach (var item in items)
{
}
fix.cs
foreach (string item in items)
{
}