Open Source Your Knowledge, Become a Contributor

Exercise - Extract a single element

Using what you have learned about First(), Last(), ElementAt(), and Single() (and their variations) modify the methods in this exercise to extract the desired element from the provided sequence of strings.

For reference, here are some examples of LINQ methods that return a single element from the sequence: