LANGUAGE
Delegate declaration
Declares a named callable type with specified parameter and result types.
Formal Syntax & Structure
csharp syntaxcsharp
delegate TResult Name(T value);Working Example
Example Snippetcsharp
using System;Rule f = x => x + 1;Console.WriteLine(f(2));delegate int Rule(int value);