I have a class in my project that stores List <> elements. I am trying to find out if I should allow the user to add to this list directly (for example, calling my own add / remove methods) or block it by declaring a personal list and allowing only a few methods that I actually find the List.
This is a framework, so I'm trying to create it as reliably as possible, but I also want it to be as simple and error-free as possible.
What is the best practice in this situation?
Thanks Tyler
source
share