18 lines
323 B
Markdown
18 lines
323 B
Markdown
# C#/.NET Formatting
|
|
When writing an `if` condition, always wrap the content of the `if` condition in `{` and `}`.
|
|
|
|
For example:
|
|
|
|
Instead of the following:
|
|
```csharp
|
|
if (value == 123)
|
|
Console.WriteLine("It's 123");
|
|
```
|
|
|
|
Write the following instead:
|
|
```csharp
|
|
if (value == 123)
|
|
{
|
|
Console.WriteLine("It's 123");
|
|
}
|
|
``` |