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

Called before item is removed from collection

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

Syntax

C#
void OnRemoving(
	ICollection Collection,
	Nullable<int> index
)
Visual Basic
Sub OnRemoving ( _
	Collection As ICollection, _
	index As Nullable(Of Integer) _
)
Visual C++
void OnRemoving(
	ICollection^ Collection, 
	Nullable<int> index
)
F#
abstract OnRemoving : 
        Collection:ICollection * 
        index:Nullable<int> -> unit 
JScript
function OnRemoving(
	Collection : ICollection, 
	index : Nullable<int>
)

Parameters

Collection
Type: System.Collections..::..ICollection
Collection item is about to be removed from
index
Type: System..::..Nullable<(Of <(<'Int32>)>)>
Index item is currently placed on; null when collection does not support indexing.

Remarks

To cancel removing, throw exception. Collection does not call this method when it does not allow cancellation of removing.

Call to OnRemoving(ICollection, Nullable<(Of <<'(Int32>)>>)) does not necesarilly mena that OnRemoved(ICollection) will be called, because event can be canceled.

Exceptions

ExceptionCondition
System..::..ExceptionAny axception may be thrown to cancel the operation. Exception is passed by collection to caller.

See Also