The Freya Programming Language

Delegates

See also

Delegate types are special classes that can be used to represent a reference or pointer to a method.

Syntax

The syntax for declaring a delegate type mimics the syntax of a method declaration, except that the method name is dropped:

Action    = method(Obj: Object);
Condition = method(Obj: Object): Boolean;

Technically speaking, every delegate type is a sealed class inheriting from System.MulticastDelegate.

See also

The Freya Programming Language
Type declarations
Class declarations
Enumerative types
Method declarations
Events