Permalink
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (27 sloc) 827 Bytes

RCS1009: Use explicit type instead of 'var' (foreach variable)

Property Value
Id RCS1009
Category Readability
Default Severity Hidden
Enabled by Default -
Supports Fade-Out -
Supports Fade-Out Analyzer -

Example

Code with Diagnostic

var items = new List<string>();

// ...

foreach (var item in items) // RCS1009
{
}

Code with Fix

foreach (string item in items)
{
}

See Also

(Generated with DotMarkdown)