fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. System.Collections.ArrayList lista1 = new System.Collections.ArrayList();
  8. lista1.Add(13);
  9. lista1.Add(113);
  10.  
  11. System.Collections.ArrayList lista2 = new System.Collections.ArrayList();
  12. lista2.Add("Blog xCSw");
  13. lista2.Add("Blog AndroiDEV");
  14.  
  15. int numeroEntero = lista1[0];
  16. Console.WriteLine(numeroEntero.ToString());
  17.  
  18. string cadena = lista2[0];
  19. Console.WriteLine(cadena);
  20. }
  21. }
Compilation error #stdin compilation error #stdout 0.03s 34760KB
stdin
Standard input is empty
compilation info
prog.cs(15,21): error CS0266: Cannot implicitly convert type `object' to `int'. An explicit conversion exists (are you missing a cast?)
prog.cs(18,24): error CS0266: Cannot implicitly convert type `object' to `string'. An explicit conversion exists (are you missing a cast?)
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty