Right, after some trial and error it's working. I had to cast it to an array
Would someone mind explaining why this is so?Code:Private Function GetSortedGroups(ByVal psp As PrincipalSearchResult(Of Principal)) As Principal() Return (From r In psp.OrderBy(Function(grp) grp.Name)).ToArray() End Function




Reply With Quote