Select specified items from Tuple List

时间:2023-03-09 19:54:23
Select specified items from Tuple List

#Select specified items from Tuple List

##Select one item to form list

`tupleList.Select(element => new string(element.Item1)).ToList();`

##Select one item to form list

Now, I have a three-Tuple List and I need to select the first and third item to form a new Tuple List.

`tupleList.Select(element => new Tuple<string, string>(element.Item1, element.Item3)).ToList();`