Aracılığıyla paylaş


How to: Visualize a Collection Association in Class Designer

Properties and fields that are collections of other types can be displayed on the class diagram as a collection association. Unlike a regular association, which displays a field or property as a line linking the owning class to the field's type, a collection association is displayed as a line linking the owning class to the collected type.

To create a collection association

  1. In code, create a property or field whose type is itself a strongly-typed collection.

  2. In the class diagram, expand the class so that properties and fields are shown.

  3. In the class, right-click the field or property and choose Show as Collection Association.

    The property or field is shown as an association line linking to the collected type.

See Also

Tasks

How to: Define Associations Between Types

Other Resources

Designing Classes and Types

Viewing Types and Relationships on Class Diagrams