[This is preliminary documentation and is subject to change.]
Removes all items from the ListWithEvents<(Of <(<'T>)>)>.
Namespace: Tools.CollectionsT.GenericTAssembly: 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
| Exception | Condition |
|---|---|
| System..::..InvalidOperationException | Locked is True |
| System..::..OperationCanceledException | Operation is canceled in eventhandler and CancelError is true |
| System..::..Exception | Any Exception can be thrown by event handler of the Clearing event -or- Any exception can be thrown by OnClearing(ICollection) when AllowItemCancel is true. |