chore: format corrections

This commit is contained in:
Oli Sturm
2023-10-20 10:10:20 +01:00
parent a2d1e4adc2
commit 0957d0c6ed
11 changed files with 110 additions and 31 deletions
+6 -8
View File
@@ -1,8 +1,9 @@
namespace CS8 {
// ReSharper disable All
namespace CS8 {
class Program {
// This is a "switch expression"
static int CalcResult(int input) => input switch
{
static int CalcResult(int input) => input switch {
1 => 2,
2 => 3,
_ => throw new ArgumentException("Rien ne va plus")
@@ -33,13 +34,10 @@
Console.WriteLine($"Found Oli, his last name is {olisLastName}.");
// Nested property patterns:
var customer = new Customer
{
Address = new Address { City = "Castle Douglas", Country = "UK" }
};
var customer = new Customer { Address = new Address { City = "Castle Douglas", Country = "UK" } };
if (customer is { Address: { City: "Castle Douglas" } }) {
Console.WriteLine("This customer lives around the corner");
}
}
}
}
}