-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

C# 6 and .NET Core 1.0

Test your knowledge and understanding by answering some questions. Get some hands-on practice and explore with deeper research into this chapter's topics.
Answer the following questions:
How are a base class and a derived class related?
What is the difference between is
and as
?
Which keyword is used to prevent a class from being derived from or a method from being overridden?
Which keyword is used to prevent a class from being instantiated with the new
keyword?
Which keyword is used to allow a member to be overridden?
What's the deal with polymorphism?
What are the signatures of the constructors that all exceptions should have?
What is an extension method and how do you define one?
Add a new console application named Ch07_Exercise02.
Create a class named Shape
with properties named Height
, Width
, and Area
.
Add three classes that derive from it—Rectangle
, Square
, and Circle
—with any additional...
Change the font size
Change margin width
Change background colour