Practicing and exploring
Test your knowledge and understanding by answering some questions, get some hands-on practice, and explore this chapter's topics with deeper research.
Exercise 5.1 – Test your knowledge
Answer the following questions:
- What are the six combinations of access modifier keywords and what do they do?
- What is the difference between the
static
,const
, andreadonly
keywords when applied to a type member? - What does a constructor do?
- Why should you apply the
[Flags]
attribute to anenum
type when you want to store combined values? - Why is the
partial
keyword useful? - What is a tuple?
- What does the C#
record
keyword do? - What does overloading mean?
- What is the difference between a field and a property?
- How do you make a method parameter optional?
Exercise 5.2 – Explore topics
Use the following links to read more about this chapter's topics:
- Fields (C...