Interfaces
An interface is a type that defines a contract for the properties and methods that an object must implement. Interfaces are used to define the structure of an object without providing an implementation. This allows for the creation of objects that can be used interchangeably, as long as they implement the required properties and methods.
See also Classes.
Syntax
Field Declaration
Method Declaration
Examples
Simple interface definition
Assigning an object to an interface
Matching an interface
See matches
expression.