示例#1
0
        /// <summary>Removes all elements from the list.</summary>
        public void Clear()
        {
            var success = EventsEnabled ? BeforeClearing.Call(this, true) : true;

            if (success)
            {
                for (var index = Count - 1; index >= 0; index--)
                {
                    RemoveAt(index);
                }

                if (EventsEnabled)
                {
                    Cleared.Call(this);
                }
            }
        }