fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Globalization;
  6. using System.Text.RegularExpressions;
  7.  
  8. public class Test
  9. {
  10. public static void Main()
  11. {
  12. List<char> chars = new List<char>(){'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J'};
  13. var newlist = chars.Where(n => n != chars.ElementAtOrDefault(2));
  14.  
  15.  
  16. foreach (var item in newlist)
  17. {
  18. Console.WriteLine(item);
  19. }
  20. }
  21. }
Success #stdin #stdout 0.03s 34784KB
stdin
Standard input is empty
stdout
A
B
D
E
F
G
H
I
J