using System.Collections.Generic;
public static void Main()
var list = new LinkedList<int>(new [] { 1, 2, 3, 4, 5, 6});
foreach (var node in list.ToNodes())
Console.WriteLine($"Is next node null - {node.Next == null}");
if (node.Value % 2 == 0) list.Remove(node);
public static class LinkedListExtensions
public static IEnumerable<LinkedListNode<T>> ToNodes<T>(this LinkedList<T> linkedList)
var current = linkedList.First;