Convert IEntityCollection to String Array

Dear community,

is there an easier / shorter way to convert values from IEntityCollection to a string array? At the moment I'm filling in the string array by looping through the IEntity object like this:


    Dim colObjects As IEntityCollection = Session.Source.GetCollection(Query.From("PersonWantsOrg").Select("XObjectKey").Where(WhereClause))

        If colObjects.Count > 0 Then

            Dim arrXObjKey As String() = New String(colObjects.Count - 1) {}

            For Each colElement As IEntity In colObjects

                arrXObjKey(counterAttCase) = colElement.GetValue("XObjectKey").ToString

                counterAttCase += 1


Thanks in advance!

Kind regards,