Basics
Challenges
Classes
Debugging
Events
External Files
Flow Control
Forms
Functions
Html Elements
Installation
Interfaces
Keywords
Modules
Namespaces
Operators
Reference Files
String
Types
This demonstrates the use of a Interface. In this example, we are using an Interface to define an Object Contract.
The DisplaySpaceship
method requires a SpaceshipConfiguration
Type which is the interface.
In this example, it is acting like a DTO.
Here's a video showing how an interface can be used to pass options:
https://www.youtube.com/watch?v=NeUrwZVi4IE