Beispiel #1
0
        /// <summary>
        /// This is overridden to allow proper comparison of free/busy objects
        /// </summary>
        /// <param name="obj">The object to which this instance is compared</param>
        /// <returns>Returns true if the object equals this instance, false if it does not</returns>
        public override bool Equals(object obj)
        {
            VFreeBusy fb = obj as VFreeBusy;

            if (fb == null)
            {
                return(false);
            }

            // The ToString() method returns a text representation of the object based on all of its settings so
            // it's a reliable way to tell if two instances are the same.
            return(this == fb || this.ToString() == fb.ToString());
        }