how to get last element in collection in c# code example Example: c# get the last item in a list var lastItem = integerList.Last();