public static ProfileInfo[] ToArray(this ProfileInfoCollection collection)
        {
            var profiles = new ProfileInfo[collection.Count];

            collection.CopyTo(profiles, 0);
            return(profiles);
        }