LibiadaCore.Core.CongenericChain.DeleteAt C# (CSharp) Method

DeleteAt() public method

Deletes given position. Clears element from position if any. Reduces chain length by 1. The delete at.
public DeleteAt ( int index ) : void
index int /// The index of position. ///
return void
        public override void DeleteAt(int index)
        {
            intervalsManager = null;
            length--;
            if (positions.Contains(index))
            {
                positions.Remove(index);
            }

            for (int i = 0; i < positions.Count; i++)
            {
                if (index < positions[i])
                {
                    positions[i]--;
                }
            }
        }