using System; public class Test { public static void Main() { System.Collections.ArrayList listaEnteros = new System.Collections.ArrayList(); // Agregación de tipos enteros: listaEnteros.Add(3); listaEnteros.Add(11); // Agregación de un objeto string. // No se generá ningún tipo de error en tiempo de // compilación, pero si posiblemente en tiempo de ejecución: listaEnteros.Add("Blog xCSw"); int acumulador = 0; // Itera la lista `listaEnteros`, sin embargo se produce una excepción // (InvalidCastException): foreach(int numero in listaEnteros) { acumulador += numero; } } }