private static string[] CollectionToArray(ICollection enumerator) { return (string[])(new ArrayList(enumerator)).ToArray(typeof(string)); }