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