Normally, I'd choose List<String>
[or, in VB, List(Of String)
] over StringCollection
whenever possible: see also Best string container.
However, as it seems, generics — and hence, List<String>
— are apparently not supported in VS 2008's settings designer. Therefore, if I want to use a list of strings in my user settings, I have to resort to using a StringCollection
there.
Now as I don't want to see StringCollection
throughout my code, I need to convert it to List<String>
. How do I do this efficiently? Or, even better, am I mistaken and there is a way to use List<String>
in settings designer?
EDIT: I have to use .NET 2.0.
See Question&Answers more detail:os