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 6.1 – test your knowledge
Answer the following questions:
- What are the four access modifiers and what do they do?
- What is the difference between the
static
,const
, andreadonly
keywords? - How many parameters can a method have?
- What does a constructor do?
- Why do you need to apply the
[Flags]
attribute to anenum
keyword when you want to store combined values? - What is a delegate?
- What is an event?
- Why is the
partial
keyword useful?
Exercise 6.2 – practice writing mathematical methods
Create a console application named Ch06_Exercise02 and add three static methods to the Program ...
Get C# 6 and .NET Core 1.0: Modern Cross-Platform Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.