This project has moved. For the latest updates, please go here.

Generate ElementColleciton as List<T>

Feb 23, 2008 at 3:09 AM
for a complicated config, there will be too many collection types

so, just generate as List<T> is a good option.
Coordinator
Feb 24, 2008 at 10:15 AM
There are a number of reasons that I generate these collection classes:
  • You have to provide some metadata that allows the configuration system to know how collections are configured (element names, collection type, ...). This is part of the generated collection classes.
  • Using List<T> would introduce a dependency on .NET 2.0 and at this point the generated configuration classes can even be used in .NET 1.x.
  • And finally, I don't think it's even possible to use List<T> as a configuration collection class :-) I've briefly tried it but didn't get it to work because it lacks the necessary metadata as described above.