Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > C# code > C# code > Reverse engineering legacy C# code > Modeling C# code in Modeler > Modeling a C# delegate in a model (C# code)
  
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.
For information about applying Stereotypes to an item, click here Applying a stereotype to a model item
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
For information about setting the tagged value of a Tag Definition, click here Setting a tagged value for an applied tag definition
7. Create child Parameters of the Operation as required. For more information about modeling Parameters, click here Modeling a C# parameter in a model (C# code)
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.