top of page

ArrayList lista = new ArrayList();

lista.Add(10);

lista.Add(10);

lista.Add(30);

lista.Add(30);

 

int total = lista.Count;

int agrupado = lista.Cast<object>().Distinct().Count();

 

// total = 4

// agrupado = 2

bottom of page