markjprice / cs11dotnet7

Repository for the Packt Publishing book titled "C# 11 and .NET 7 - Modern Cross-Platform Development Fundamentals" by Mark J. Price
566 stars 206 forks source link

Relational pattern + property pattern example missing decimal literal value suffix "M" #87

Closed NoelArzola closed 10 months ago

NoelArzola commented 10 months ago

Example code missing decimal literal value suffix "M" Chapter: 5 Page Number: 244 Section Title: Enhancements to pattern matching in C# 9 or later Problem to fix: FirstClassPassenger { AirMiles: > 35000 } => 1500, Suggested solution: FirstClassPassenger { AirMiles: > 35000 } => 1500M, Other useful information e.g. OS, coding tools, and so on:

Screenshot 2023-10-22 at 13 08 15
markjprice commented 10 months ago

Thanks. I have added this to the errata: https://github.com/markjprice/cs11dotnet7/blob/main/docs/errata/errata.md#page-244---enhancements-to-pattern-matching-in-c-9-or-later