Timeline for Is it a good practice to create a ClassCollection of another Class?
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 17, 2019 at 20:15 | comment | added | Ryan | Just as a note from MSDN: "We don't recommend that you use the CollectionBase class for new development. Instead, we recommend that you use the generic Collection<T> class." - docs.microsoft.com/en-us/dotnet/api/… | |
Apr 26, 2013 at 23:22 | vote | accept | Luis | ||
Apr 25, 2013 at 17:31 | comment | added | Trevor Pilley |
@Luis I wouldn't recommend the CarCRUD extension as enforcing its use would be difficult, the advantage to putting the custom crud logic in the collection class is that there is no way to bypass it. Additionally, you may not actually care about the Find logic in the core assembly where Car etc are declared, that might be a UI only activity.
|
|
Apr 25, 2013 at 17:27 | history | edited | Trevor Pilley | CC BY-SA 3.0 |
Added some examples of recent Microsoft classes which are custom collections
|
Apr 25, 2013 at 17:22 | comment | added | Luis |
Following this approach, I could even dismiss the ClassCollection even for the add, delete, update methods, by adding a new CarCRUD which will encapsulate all this methods...
|
|
Apr 25, 2013 at 17:15 | history | answered | Trevor Pilley | CC BY-SA 3.0 |