コード例 #1
0
ファイル: EventCollection.cs プロジェクト: lenloe1/Stuff
        }        //Add

        /// <summary>
        /// Adds an Event to the EventCollection at the given index
        /// </summary>
        /// <param name="intIndex">
        /// Index to insert the Event into in the collection
        /// </param>
        /// <param name="objToAdd">
        /// The Event to be added
        /// </param>
        /// <example>
        /// <code>
        /// CEventCollection coll = new CEventCollection();
        /// coll.Insert(3, new CEvent());
        /// </code>
        /// </example>
        /// Revision History
        /// MM/DD/YY who Version Issue# Description
        /// -------- --- ------- ------ ---------------------------------------
        /// 02/15/06 rrr N/A	 N/A	Creation of class
        public void Insert(int intIndex, CEvent objToAdd)
        {
            InnerList.Insert(intIndex, objToAdd);
        }        //Insert
コード例 #2
0
ファイル: EventCollection.cs プロジェクト: lenloe1/Stuff
        }        //this[]


        /// <summary>
        /// Adds an Event to the end of the EventCollection
        /// </summary>
        /// <param name="objToAdd">
        /// The Event to be added
        /// </param>
        /// <returns>
        /// The zero base index of the Event added
        /// </returns>
        /// <example>
        /// <code>
        /// CEventCollection coll = new CEventCollection();
        /// coll.Add(new CEvent());
        /// </code>
        /// </example>
        /// Revision History
        /// MM/DD/YY who Version Issue# Description
        /// -------- --- ------- ------ ---------------------------------------
        /// 02/15/06 rrr N/A	 N/A	Creation of class
        public int Add(CEvent objToAdd)
        {
            return(InnerList.Add(objToAdd));
        }        //Add
コード例 #3
0
        }         //CEvent

        /// <summary>
        /// Used to be able to compare two CEvent objects based on the date
        /// </summary>
        /// <param name="obj">
        /// The event to compare to the current event
        /// </param>
        /// <returns>
        /// An int that represents the objects being equal, less than, or greater than
        /// </returns>
        /// Revision History
        /// MM/DD/YY who Version Issue# Description
        /// -------- --- ------- ------ ---------------------------------------
        /// 02/15/06 rrr N/A	 N/A	Creation of class
        public int CompareTo(object obj)
        {
            CEvent objCompare = (CEvent)obj;

            return(this.Date.CompareTo(objCompare.Date));
        }         //CompareTo