Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 594 Bytes

RCS1009.md

File metadata and controls

36 lines (24 loc) · 594 Bytes

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

Property Value
Id RCS1009
Category Readability
Severity None

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)