StringCollection
to List<String>
or other IEnumerable<String>
type became easy.Just use powerful Enumerable.Cast<TResult> method from System.Linq namespace:
StringCollection stringCollection = new StringCollection();
...
List<String> stringList = stringCollection.Cast<String>().ToList();
Full example on GitHub: StringCollection2IEnumerableString.cs
thumbs up
ReplyDelete