fork download
  1. using System;
  2.  
  3. public class SplitTest {
  4. public static void Main() {
  5.  
  6. string words = "This is a list of words, with: a bit of punctuation" +
  7. "\tand a tab character.";
  8. words.Concat("hello");
  9.  
  10. string [] split = words.Split(new Char [] {' ', ',', '.', ':', '\t' });
  11.  
  12. foreach (string s in split) {
  13.  
  14. if (s.Trim() != "")
  15. Console.WriteLine(s);
  16. }
  17. }
  18. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(8,17): error CS0176: Static member `string.Concat(params string[])' cannot be accessed with an instance reference, qualify it with a type name instead
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty