I made a matrix from list of list. How can I remove column ‘i’ and row ‘i’? Is there a method for that? I’ve tried RemoveAt but that’d remove one item.
List<List<int>> mtx = new List<List<int>>();
0 1 2 3
-------
0|0 0 0 0
1|0 0 0 0
2|0 0 0 0
3|0 0 0 0
For example I would like to delete row i=2
You have to do it in 2 times.
First remove the 1st dimension. (I like better to talk about dimensions than columns/rows which can be misinterpreted)
Then iterate over 1st dimension to remove your element on 2nd dimension.