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# enum in a model (C# code)
  
Modeling a C# enum in a model (C# code)
A C# enum is modeled through a Modeler Type Definition.
To model a C# enum in a model:
1. In the model, right-click the Model, Package, Class or Signal that is to own the enum, point to New, point to Class Model, point to Type Definition, and then click Enumeration.
2. Type the name of the enum.
3. Open the Type Definition's Property Pages, and set the standard properties of the Type Definition as required.
4. If you want to specify C# specific information, that is, an enum base type, attributes and the internal modifier:
a. Apply the «C# Enum» stereotype to the Type Definition.
For information about applying Stereotypes to an item, click here Applying a stereotype to a model
b. On the Type Definition's Property Pages, click the C# Enum tab.
c. Set the tagged values of the Tag Definitions as required.
For more information about the available Tag Definitions, click here Type definition mapping
For information about setting the tagged value of a Tag Definition, click here Setting a tagged value for an applied tag definition
5. Create the enum's members through child Enumeration Literals of the Type Definition. For more information about modeling enum members, click here Modeling a Csharp enum member in a studio model