Modeling a C# delegate in a model (C# code)
A C# delegate is modeled through a Modeler Operation.
Note that an Interface cannot have nested delegate definitions.
To model a C# delegate in a model:
1. In the model, right-click the Model, Package, Class or Data Type that is to own the delegate:
◦ Point to New , and then click Operation
or
◦ Point to New , point to UML , point to Behavior , and then click Operation .
2. Type the name of the delegate.
3. Set the standard properties of the Operation as required.
4. Apply the «C# Delegate» stereotype to the Operation.
5. On the Operation's Property Pages, click the C# Delegate tab.
6. Set the tagged values of the Tag Definitions as required.
For more information about the available Tag Definitions, click here
Operation mapping
The following C# code elements can use a delegate as a type through the C# Delegate Type tag definition: constants, events, fields, indexers, methods, operators, parameters and properties.