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# property in a model (C# code)
  
Modeling a C# property in a model (C# code)
A C# property is modeled through a Modeler Attribute or Role:
Use a Role when the type of the property is a class, struct or interface.
Use an Attribute when the type of the property is not a class, struct or interface.
To model a C# property through an attribute in a model:
1. In the model, right-click the Class or Data Type that models the element that is to own the C# property, point to New, and then click Attribute.
2. Type the name of the C# property.
3. Open the Attribute's Property Pages, and then click the Data Type tab.
4. Click the Select button, and then select the item that is to be the type of the C# property.
If you want to use a delegate as a type, reference the Operation that generates the delegate through the C# Delegate Type tag definition that is applied by the «C# Property» stereotype.
5. Set the other properties of the Attribute as required.
6. Apply the «C# Property» stereotype to the Attribute.
For information about applying Stereotypes to an item, click here Applying a stereotype to a model item
7. On the Attribute's Property Pages, click the C# Property tab.
8. If the type of the property is a generic type, specify the type arguments through the tagged value of the C# Actual Parameters tag definition, which is applied to the Attribute through the «C# Property» stereotype.
For information about setting the tagged value of a Tag Definition, click here Setting a tagged value for an applied tag definition
9. Set the other tagged values of the Tag Definitions as required.
For more information about the available Tag Definitions, click here Attribute mapping
* 
ACS generates a property only after a tagged value is set for either the C# Get Accessor Body or C# Set Accessor Body tag definition.
To model a C# property through a role in a model:
1. On a Class Diagram, from the Class or Data Type that is to own the C# property, create an Association to the Class, Data Type or Interface that is to be the type of the C# property.
2. In the Packages pane, expand the Class or Data Type that is to own the property, and locate the Role you have created through the Association.
3. Set the Name of the Role to that of the C# property you want to create.
4. Set the other properties of the Role as required.
5. Apply the «C# Property» stereotype to the Role.
For information about applying Stereotypes to an item, click here Applying a stereotype to a model item
6. On the Role's Property Pages, click the C# Property tab.
7. If the type of the property is a generic type, specify the type arguments through the tagged value of the C# Actual Parameters tag definition, which is applied to the Role through the «C# Property» stereotype.
For information about setting the tagged value of a Tag Definition, click here Setting a tagged value for an applied tag definition
8. Set the other tagged values of the Tag Definitions as required.
For more information about the available Tag Definitions, click here Association mapping
* 
ACS generates a property only after a tagged value is set for either the C# Get Accessor Body or C# Set Accessor Body tag definition.