fork(1) download
  1. using System;
  2. using System.Collections.Generic;
  3.  
  4. class Example
  5. {
  6. public static void Main()
  7. {
  8. Queue<string> bookCollection = new Queue<string>();
  9.  
  10. bookCollection.Enqueue ("The Black Book");
  11. bookCollection.Enqueue ("The Light we Cannot See");
  12. bookCollection.Enqueue ("The Sun is Also a Star");
  13. bookCollection.Enqueue ("A Man Called Ove");
  14. bookCollection.Enqueue ("A Dog's Purpose: A Novel for Humans");
  15.  
  16. // Print the breeds in my Queue
  17. Console.WriteLine("Here are some of the most popular books on New York Times best sellers list:");
  18. foreach (string books in bookCollection)
  19. {
  20. Console.WriteLine(books);
  21. }
  22. bookCollection.Dequeue (2);
  23.  
  24. Console.WriteLine("\nLets get rid of a couple and add some more.");
  25. foreach (string books in bookCollection)
  26. {
  27. Console.WriteLine(books);
  28. }
  29.  
  30.  
  31. Console.Write("\nNumber of books listed above: " + bookCollection.Count);
  32. }
  33. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(22,18): error CS1501: No overload for method `Dequeue' takes `1' arguments
/usr/lib/mono/4.5/System.dll (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings
stdout
Standard output is empty