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 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…