Landis.Harvest.AgeRange.Contains C# (CSharp) Method

Contains() public method

Does the range contain a particular age?
public Contains ( ushort age ) : bool
age ushort
return bool
        public bool Contains(ushort age)
        {
            return (start <= age) && (age <= end);
        }

Usage Example

        //---------------------------------------------------------------------

        /// <summary>
        /// Does the range overlap another range?
        /// </summary>
        public bool Overlaps(AgeRange other)
        {
            return Contains(other.Start) || other.Contains(start);
        }