Namespace
You define a C# namespace using a package.
Project
You can reverse engineer C# projects when you select C# projects from the Reverse Engineer list in the Reverse Engineer C# dialog box.
Accessibility
To define accessibility for a class, an interface, or a method, you have to use the visibility property in PowerDesigner.
Classes, Interfaces, Structs, and Enumerations
You design a C# class using a class in PowerDesigner. Structures are classes with the <<structure>> stereotype, and enumerations are classes with the <<enumeration>> stereotype.
Custom Attributes
To define custom attributes for a class, an interface, a variable, a parameter or a method, you have to use the CustomAttributes extended attribute in PowerDesigner. You can use the CustomAttributes input box to type all the custom attributes you wish to add using the correct C# syntax.
Fields
You design a C# field using an attribute in PowerDesigner.
Property
To design a C# property you have to design an attribute with the <<Property>> stereotype.
Indexer
You design a C# indexer using an attribute with the <<Indexer>> stereotype. Another attribute with the <<IndexerImplementation>> stereotype is automatically created, it is displayed with an underscore sign in the list of attributes. The corresponding getter and setter operations are also automatically created.
Constructor & Destructor
You design C# constructors and destructors by clicking the Add Default Constructor/Destructor button on the class property sheet Operations tab. This automatically creates a constructor with the Constructor stereotype, and a destructor with the Destructor stereotype. Both constructor and destructor are grayed out in the list, which means you cannot modify their definition, but you can still remove them from the list.
Delegate
You can design the following types of C# delegates:
Event
You design a C# event using an attribute with the <<Event>> stereotype.
Operator Method
You design a C# operator using an operation with the <<Operator>> stereotype. Make sure the <<Operator>> operation has the Public visibility and the Static property selected.
Conversion Operator Method
You design a C# conversion operator using an operation with the <<ConversionOperator>> stereotype.
Documentation Tags
To generate documentation tags, you should use the Comment box in property sheets. You can use any documentation tag before and after documentation, for example you can type <summary> and </summary>.
Generating C# Files
You generate C# source files from the classes and interfaces of a model. A separate file, with the file extension .cs, is generated for each class or interface that you select from the model, along with a generation log file.