ActionType printHello = () => Console.WriteLine("Hello world!"); printHello();
public class MyClass { public event ActionType MyEvent; public void DoSomething() { // ... MyEvent?.Invoke(); // ... } }This code defines a class `MyClass` with an event `MyEvent` of type `ActionType`. When `DoSomething()` method is called it will fire the event, invoking all registered delegates. ActionType is part of the System namespace in the .NET Framework. No additional package or library is required.