public void Add(int[] data) { MatrixNode node = new MatrixNode(data); if (head == null) { head = node; } else { tail.Next = node; } tail = node; count++; }
public int Elem(int i, int j) { if (i >= count) { throw new IndexOutOfRangeException(); } if (i < 0) { throw new IndexOutOfRangeException(); } MatrixNode curremt = head; for (int k = 0, l = 0; curremt != null; k++, l++) { if (i == k && j == l) { return(curremt.Data[i]); } else { curremt = curremt.Next; } } return(default);