formatting

This commit is contained in:
Oli Sturm
2023-11-07 22:24:33 +00:00
parent 0957d0c6ed
commit 95e71b8c8f
+5 -1
View File
@@ -15,7 +15,11 @@ namespace CS10 {
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");
}