diff --git a/samples/CS11/CS11.csproj b/samples/CS11/CS11.csproj
index d439800..43323f1 100644
--- a/samples/CS11/CS11.csproj
+++ b/samples/CS11/CS11.csproj
@@ -5,6 +5,7 @@
net7.0
enable
enable
+ preview
diff --git a/samples/CS8/Program.cs b/samples/CS8/Program.cs
index 6eb5438..5e68f0d 100644
--- a/samples/CS8/Program.cs
+++ b/samples/CS8/Program.cs
@@ -22,12 +22,16 @@
}
static void Main(string[] args) {
- // Positional pattern (using a tuple - hence "tuple pattern")
- // Important: this works with any deconstructable type!
+ // This is a tuple, supported since C# 7
(string, string) personInfo = ("Oli", "Sturm");
var (firstName, lastName) = personInfo;
// firstName ist jetzt "Oli" und lastName ist "Sturm"
+ // Positional pattern (using a tuple - hence "tuple pattern" in this special case)
+ // Important: this works with any deconstructable type! Example coming up in CS9 sample.
+ if (personInfo is ("Oli", var olisLastName))
+ Console.WriteLine($"Found Oli, his last name is {olisLastName}.");
+
// Nested property patterns:
var customer = new Customer
{