C# 2.0 Classes

PowerDesigner models C# 2.0 classes as standard UML classes, but with additional properties.

For information about creating and working with classes, see Classes (OOM).

In the following example, class DialogBox inherits from class Window, which contains an inner classifier Control, as does class DialogBox:



{
 public class DialogBox : Window
 {
  public new class Control
  {
  }
 }
}

In the following example, the class Client is defined as abstract by selecting the Abstract check box in the General tab of the class property sheet:



{
 public abstract class Client
 {
  private int Name;
  private int ID;
 
 }
}

In the following example, the class SealedClient is defined as sealed by selecting the Final check box in the General tab of the class property sheet:



{
 public sealed class SealedClass
 {
  private int A1;
  private int A2;
 
 }
}

C# Class Properties

C# class property sheets contain all the standard class tabs along with the C# tab, the properties of which are listed below:

Property

Description

Static

Specifies the static modifier for the class declaration.

Sealed

Specifies the sealed modifier for the class declaration.

New

Specifies the new modifier for the class declaration.

Unsafe

Specifies the unsafe modifier for the class declaration.