Delete() public method

Deletes the specified elem.
public Delete ( int elem ) : AllenDomain
elem int The elem.
return AllenDomain
コード例 #1
0
        /// <summary>
        /// Caps the interval.
        /// </summary>
        /// <param name="lo">The lo.</param>
        /// <param name="hi">The hi.</param>
        /// <returns></returns>
        public virtual AllenDomain CapInterval(int lo, int hi)
        {
            AllenDomain d = this;

            if (MinValue < lo)
            {
                d = d.Delete(MinValue, lo - 1);
            }
            if (hi < MaxValue)
            {
                d = d.Delete(hi + 1, MaxValue);
            }
            return(d);
        }