![]() |
VOOZH | about |
public void RemoveLast ();Exception: The method throws InvalidOperationException if the LinkedList<T> is empty. Below given are some examples to understand the implementation in a better way: Example 1: Output:
The elements in LinkedList are : A B C D E The elements in LinkedList are : A B C DExample 2:
Unhandled Exception: System.InvalidOperationException: The LinkedList is empty.Note: This method is an O(1) operation. Reference: