示例#1
0
        public void RemoveAt(int index)
        {
            if (index < 0 || index >= Count)
            {
                throw new ArgumentOutOfRangeException(nameof(index));
            }

            NativeMethodsForSwiftArray.ArrayRemoveAt(CheckedSwiftData, index, ElementMetatype);
        }
示例#2
0
        public bool Remove(T item)
        {
            nint i = 0;

            foreach (T thing in this)
            {
                if (Equals(thing, item))
                {
                    NativeMethodsForSwiftArray.ArrayRemoveAt(CheckedSwiftData, i, ElementMetatype);
                    return(true);
                }
                i++;
            }
            return(false);
        }