documentsOC.Add
returns void
.
It doesn't make any sense (and is impossible) to write .Select(...)
.
What you're trying to do cannot work in the first place; Select
is lazy and doesn't call your function until you enumerate the results.
You should use a regular foreach
loop.