Closed
Description
Type of issue
Typo
Description
Style guidelines specify:
Use the "Allman" style for braces: open and closing brace its own new line. Braces line up with current indentation level.
But this example on the same page doesn't use braces.
foreach (char ch in laugh)
{
if (ch == 'h')
Console.Write("H");
else
Console.Write(ch);
}
Console.WriteLine();
Examples on the page should be consistent to avoid confusion, or guidelines should specify if the "Allman" style is optional for one-line statements.
Page URL
https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/coding-style/coding-conventions
Content source URL
https://github.com/dotnet/docs/blob/main/docs/csharp/fundamentals/coding-style/coding-conventions.md
Document Version Independent Id
f940f2ad-e13d-4d37-6439-f8afcbc4e4c7
Article author
Metadata
- ID: 40f42506-f4a5-859a-0266-ded002056d83
- Service: dotnet-csharp
- Sub-service: fundamentals