How to represent a .NET dictionary type in UML?

2019-07-13 11:12发布

问题:

I'm creating a uml class diagram and I would like to know if anyone can assist me with this. I would like to know how to represent a dictionary type using UML notation. for example how can I represent the following dictionary(Dictionary<FileType,StorageType>)type in UML.

回答1:

It depends on what information you are trying to convey in your diagram. However you could:

  1. Attach a stereotype to your relationship
  2. Use an association class
  3. Use a Ternary association
  4. Decide the collection type is an implementation detail and not show it
  5. Discover some additional behaviours about the association and promote


回答2:

I used to represent it with a qualified association