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 access modifiers and what do they do?
- What is the difference between the
static
,const
, andreadonly
keywords? - 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#
ref
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# programming guide): https://docs.microsoft.com/en-us/dotnet/articles/csharp/programming...