How to do it...

  1. Create an abstract class called SpaceCadet. This is the first type of astronaut you can get when starting with training. The abstract class and its members are defined using the abstract keyword. A thing to note is that abstract classes cannot be instantiated. The members represent the skills that SpaceCadet will have, such as negotiation and basic weapons training:
        public abstract class SpaceCadet         {           public abstract void ChartingStarMaps();           public abstract void BasicCommunicationSkill();           public abstract void BasicWeaponsTraining();           public abstract void Negotiation();         }
  1. Next, create another abstract class called SpacePrivate. This abstract class inherits from the SpaceCadet abstract class. What we are basically saying ...

Get C# 7 and .NET Core Cookbook 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.