public void Extend(CArray <T> a) { for (int i = 0; i < a.Length; i++) { PushBack(a[i]); } }
public CArray(CArray <T> array) { _length = array._length; _size = array._size; _arr = new T[_size]; for (int i = 0; i < _length; i++) { _arr[i] = array._arr[i]; } }
public override bool Equals(object obj) { if (obj == null) { return(false); } CArray <T> a = (CArray <T>)obj; if (_length != a._length) { return(false); } for (int i = 0; i < _length; i++) { if (!a._arr[i].Equals(_arr[i])) { return(false); } } return(true); }