Ejemplo n.º 1
0
        /// <summary>
        /// Remove data from this list.
        /// All data in "this" list that is contained
        /// in parameter "data" is removed from this list.
        /// </summary>
        /// <param name='data'>Data that should be removed.</param>
        public void Remove(DataId32List <T> data)
        {
            Int32 index;

            if (this.IsNotEmpty() && data.IsNotEmpty())
            {
                for (index = Count - 1; index >= 0; index--)
                {
                    if (data.Exists(this[index]))
                    {
                        RemoveAt(index);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get the subset of two lists.
        /// All data in "this" list that is not contained
        /// in parameter "data" is removed from this list.
        /// </summary>
        /// <param name='data'>The data list to compare with.</param>
        public void Subset(DataId32List <T> data)
        {
            Int32 index;

            if (this.IsNotEmpty())
            {
                if (data.IsEmpty())
                {
                    Clear();
                }
                else
                {
                    for (index = Count - 1; index >= 0; index--)
                    {
                        if (!data.Exists(this[index]))
                        {
                            RemoveAt(index);
                        }
                    }
                }
            }
        }