```
List<List<double>> A = new List<List<double>>()
{
    new List<double>() { 1, 0, 0 },
    new List<double>() { 1, -1, 0 }
};

List<List<double>> Temm = new List<List<double>>();
for (int i = 0; i < A.Count; i++)
{
     for (int j = 0; j < A[i].Count; j++)
     {
         if (A[i][j] != 0) 
         {
             Temm[i][j] = A[i][j]; 
         }
         else 
         { 
             Temm[i][j] = Temm[i][j - 1]; }
         }
     }
}

```

There is something wrong with this double for loop, I think `Temm[i][j]` maybe illegal, so what's the correct way ? I also wanted to know how to declare the given size of the two dimensional List 

```
List<List<double>> Temm = new List<List<double>>

```

say
`Z * Y`?