fork download
  1. using system;
  2. public void Linq90()
  3. {
  4. string[] words = { "cherry", "apple", "blueberry" };
  5.  
  6. double averageLength = words.Average(w => w.Length);
  7.  
  8. Console.WriteLine("The average word length is {0} characters.", averageLength);
  9. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(2,13): error CS0116: A namespace can only contain types and namespace declarations
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty