Multiple single line foreach indentation style
Answered
Hi, I'd like to get rider to indent multiple foreach statements when reformatting code.
What setting do I change?
I want this:
foreach (var productInfo in productList)
foreach (var baseName in BaseNames)
imageList.AddRange(CreateImages(productInfo, baseName, ""));
But Rider does this:
foreach (var productInfo in productList)
foreach (var baseName in BaseNames)
imageList.AddRange(CreateImages(productInfo, baseName, ""));
Please sign in to leave a comment.
Pieter, thank you for your question.
Please enable the following option: File | Settings | Editor | Code Style | C# | Tabs, Indents, Alignment | Nested statements | Indent nested 'foreach' statements. Does it work for you?
That works, thank you.