fork(5) download
  1. using System;
  2. using System.Globalization;
  3. using System.Linq;
  4. using System.Collections.Generic;
  5.  
  6. public class Test
  7. {
  8.  
  9. public static string RemoveFirstLine(string input)
  10. {
  11. var lines = input.Split(new[] { Environment.NewLine }, StringSplitOptions.None);
  12. return string.Join(Environment.NewLine, lines.Skip(1).ToArray()); //ideone uses .NET 3.5
  13. }
  14.  
  15. public static void Main()
  16. {
  17. string str = @"-- REMOVE ME --
  18. Line 2
  19. Line 3
  20. Line 4
  21. Line 5";
  22. str = RemoveFirstLine(str);
  23. Console.Write(str);
  24. }
  25. }
Success #stdin #stdout 0.06s 34120KB
stdin
Standard input is empty
stdout
                        Line 2
                        Line 3
                        Line 4
                        Line 5