.net - What are the advantages/disadvantages of Generic List (Of Type) and Collections -


According to the questions, I have always assumed that there is a better appraoch in a strongly written list which is using the collection. However, after discussions with a colleague, I want to give a better answer than "better reason" today because "I can explain to anyone" major differences and the benefits / losses of each approach

Edit:

Strong-typed with lists based on generic Collections allow you to program without checking the type, retrieve the list of objects. This code creates cleaners because you do not have to cast it to use the object and because of the collections of the wrong type of objects Worries about throwing exceptions There is no need to do It has been assumed that you can get a lot more through unit testing, but using generic, the compiler can check in time compile instead of checking at runtime. It is much more efficient, you can still mess with things written in an inefficient way to learn about the errors of compilation-time, but then you can get it without any proper investigation.


Comments