Book a Demo

Author Topic: Appropriate collection classes for C#  (Read 3105 times)

sahl04

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Appropriate collection classes for C#
« on: November 12, 2008, 01:53:11 am »
Dear all,

i searched a long time for the appropriate settings of the collection classes for C# projects - but i did not find anything.

Currently i used the following settings

Default Collection Class:
    Collection<#TYPE#>

Collection Class for Ordered Multiplicity:
    SortedDictionary<object, #TYPE#>

Collection Class for Qualified Multiplicity:
    Dictionary<object, Collection<#TYPE#>>

But especially on the 3rd one i am insecure.

Any comments welcome.

Best regards
Dirk

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Appropriate collection classes for C#
« Reply #1 on: November 12, 2008, 08:15:40 am »
If there were a single right answer, EA wouldn't need to provide the option.

Use the values that make the most sense to you.  If you don't need to use one type of relationship, don't specify the collection class.  Where you need to, override it for the class being collected, or the individual relationship.
« Last Edit: November 12, 2008, 08:16:27 am by simonm »