Convert StringCollection to List

Converting StringCollection to List<string> is wonderfully simple if you’re using .NET 3.5.

var list = stringCollection.Cast<string>().ToList();

Regarding your second question, I do seem to recollect that it is possible to use List<string> in the settings designer of Visual Studio. If you select custom type then browser to the appropiate type, it should work. However, I could be mistaken on that, so I’ll need to verify it.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)