fork download
  1. //******************************************************************
  2. // Addition.cs C#: Ken Culp
  3. //
  4. // Demonstrations the difference between the addition and string
  5. // concatenation
  6. //******************************************************************
  7. using system;
  8.  
  9. namespace addition
  10. {
  11. Class addition
  12. {
  13. static void Main (string[] args)
  14. {
  15. Console.Out.WriteLine("24 and 45 concatenated: " + 24 +45);
  16. Console.Out.WriteLine("24 and 45 added: " + (24 + 45));
  17. Console.In.ReadLine();
  18. }
  19. }
  20. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(12,2): error CS1518: Expected `class', `delegate', `enum', `interface', or `struct'
prog.cs(19,2): error CS8025: Parsing error
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty