Esempio n. 1
0
        /// <summary>
        /// Implementation of IComparable.CompareTo interface, to allow ordering of events in an ArrayList.
        /// </summary>
        public int CompareTo(object obj)
        {
            if (obj is Events)
            {
                Events anEvent = (Events)obj;

                return(TimeCode.CompareTo(anEvent.TimeCode));
            }

            throw new ArgumentException("Object is not an Event");
        }