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
+5 -6
View File
@@ -1,4 +1,6 @@
namespace CS10 {
// ReSharper disable All
namespace CS10 {
class Program {
// Nested types, just like the C# 8 sample:
public class Address {
@@ -13,13 +15,10 @@
static void Main(string[] args) {
// Nested property patterns, now shorter:
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");
}
}
}
}
}