Example #1
0
        /// <summary>
        /// Determines whether the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>.
        /// </summary>
        /// <param name="obj">The <see cref="T:System.Object"/> to compare with the current <see cref="T:System.Object"/>.</param>
        /// <returns>
        /// true if the specified <see cref="T:System.Object"/> is equal to the current <see cref="T:System.Object"/>; otherwise, false.
        /// </returns>
        /// <exception cref="T:System.NullReferenceException">The <paramref name="obj"/> parameter is null.</exception>
        public override bool Equals(object obj)
        {
            if (!base.Equals(obj))
            {
                return(false);
            }
            RangeCategory <T> otherRange = (RangeCategory <T>)obj;

            return(LowerLimit.Equals(otherRange.LowerLimit) && UpperLimit.Equals(otherRange.UpperLimit));
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="NullableRangeCategory&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="originCategory">The origin category.</param>
 public NullableRangeCategory(RangeCategory <T> originCategory)
     : base(originCategory.Name)
 {
     _originCategory = originCategory;
 }