Find the last node that contains the specified value in CSharp
Description
The following code shows how to find the last node that contains the specified value.
Example
using System;/*from w ww . j ava 2 s. co m*/
using System.Collections;
using System.Collections.Generic;
public class GenericCollection
{
public static void Main()
{
LinkedList<String> ll = new LinkedList<String>();
ll.AddLast( "A" );
ll.AddLast( "B" );
ll.AddLast( "C" );
ll.AddLast( "java2s.com" );
LinkedListNode<String> t = ll.FindLast("A");
Console.WriteLine(t.Value);
}
}
The code above generates the following result.