I've a ListView (named ListView1). I added 4 columns (with visual editor, property Column): NumeroLista,OrdenLista,NumElementos,TiempoOrdenamiento.
I'm sure the code is reached because before it is in a function called directly from class constructor. I'm trying to fullfil it with the following code but it keeps blank (please notice: the arrays I'm using are inizialized in another part of the code):
int idx;
string tmp;
string[][] linea = new string[numListas][];
for (idx = 0; idx < numListas; idx++)
{
linea[idx] = new string[3];
linea[idx][0] = Convert.ToString(idx);
switch(OrdenListas[idx]){
case 0: linea[idx][1] = "Crescente"; break;
case 1: linea[idx][1] = "Decrescente"; break;
case 2: linea[idx][1] = "Aleatorio"; break;
default: linea[idx][1] = "No especificado"; break;
}
linea[idx][2] = Convert.ToString(LongitudListas[idx]);
ListViewItem lvi = new ListViewItem();
lvi.SubItems.Add(linea[idx][0]);
lvi.SubItems.Add(linea[idx][1]);
lvi.SubItems.Add(linea[idx][2]);
lvi.SubItems.Add("test");
listView1.Items.Add(lvi);
listView1.Refresh();
}