O'Reilly logo

C# 7 and .NET Core Cookbook by Dirk Strauss

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required