nPos | (Long) The index of removed item/row.
The -2 value represents the last item. |
---|---|
nCount | [optional] (Long) The number of items/rows to be removed.
If not set, then is 1. The items/rows are being removed from defined position towards the end of the array. If the last position of the array is set (-2) then the items/rows are being removed from the end of the array towards the beginning. Either all selected items are removed successfully or the method fails. |
var aVal = Pm.CreatePmArray().Array1(0, 10, 20, 30, 40);
aVal.Remove(2, 2);
// Result: (0, 10, 40)
// or
aVal.Remove(-2, 2);
// Result: (0, 10, 20)
var aVal = Pm.CreatePmArray();
var n = 100;
aVal.Create(n);
aVal.SetItem("Test1", 0);
aVal.SetItem("Test2", 1);
aVal.Remove(2, n - 2);