示例#1
0
文件: ListXT.cs 项目: ajbadaj/AJut
        /// <summary>
        /// Clears the list, then adds each of the other
        /// </summary>
        /// <typeparam name="T">The type of list it is</typeparam>
        /// <param name="This">The list this is called on</param>
        /// <param name="otherList">The list whose contents are added to this list</param>
        public static void ResetWith <T> (this ICollection <T> This, ICollection <T> otherList)
        {
            if (This == null)
            {
                return;
            }

            This.Clear();
            This.AddEach(otherList);
        }