initializing the code rules
This commit is contained in:
18
CSHARP_FORMATTING.md
Normal file
18
CSHARP_FORMATTING.md
Normal file
@@ -0,0 +1,18 @@
|
||||
# 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");
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user