Here you ask to create a new cs file under PacktLibraryNetStandart2 project. However, the init keyword does not work in .Net 2.
Chapter: 05
Page Number: 244
Section Title: working with records
Step Number: 1
Problem to fix: target .NET 2
Suggested solution: I moved the file under the PacktLibraryModern that targets .NET 7. There it's working correctly.
Other useful information e.g. OS, coding tools, and so on:
Here you ask to create a new cs file under PacktLibraryNetStandart2 project. However, the init keyword does not work in .Net 2.
Chapter: 05 Page Number: 244 Section Title: working with records Step Number: 1 Problem to fix: target .NET 2 Suggested solution: I moved the file under the PacktLibraryModern that targets .NET 7. There it's working correctly. Other useful information e.g. OS, coding tools, and so on: