[This is preliminary documentation and is subject to change.]

Removes all items from the ListWithEvents<(Of <(<'T>)>)>.

Namespace: Tools.CollectionsT.GenericT
Assembly: Tools (in Tools.dll) Version: 1.5.3.38916 (1.5.3.38916)

Syntax

C#
public override void Clear()
Visual Basic
Public Overrides Sub Clear
Visual C++
public:
virtual void Clear() override
F#
abstract Clear : unit -> unit 
override Clear : unit -> unit 
JScript
public override function Clear()

Implements

ICollection<(Of <(<'T>)>)>..::..Clear()()()()

Remarks

Note for inheritors: Call OnClearing(CancelMessageEventArgs) before clearing of the list and OnCleared(ListWithEvents<(Of <<'(T>)>>)..::..ItemsEventArgs) after clearing of the list,, do not forgot to check Cancel

Exceptions

ExceptionCondition
System..::..InvalidOperationExceptionLocked is True
System..::..OperationCanceledExceptionOperation is canceled in eventhandler and CancelError is true
System..::..ExceptionAny Exception can be thrown by event handler of the Clearing event -or- Any exception can be thrown by OnClearing(ICollection) when AllowItemCancel is true.

See Also