We have seen that a LINQ expression produces a list of
values and, so far, the resulting list was stored in a variable created in a
from clause. If you want, you can store the result of the LINQ
expression in a specific (or external) variable. To support this, the
IEnumerable interface provides the ToArray() and the ToList()
methods. The syntax of the ToArray() method is:

Instead of first creating the select list, then
declaring an array variable, you can include the LINQ statement in
parentheses and call the ToArray() method outside the closing
parenthesis. Here is an example: