Practicing and exploring
Test your knowledge and understanding by answering some questions, getting some hands-on practice, and exploring this chapter's topics with deeper research.
Exercise 5.1 – online material
Online material can be extra content written by me for this book, or it can be references to content created by Microsoft or third parties.
Pattern matching
There are many ways to use pattern matching in your projects. I recommend that you review the official documentation at the following link: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals/functional/pattern-matching.
Exercise 5.2 – practice exercises
Practice exercises go deeper into the topics for this chapter.
Practice access modifiers
Imagine that you are the compiler. What errors would you show when building the following projects? What would need to change to fix it?
In a class library project, in Car.cs
:
class Car
{
int Wheels { get; set; }
public bool IsEV { get; set; }
...