CollectionEditor.CollectionForm.CanRemoveInstance Method (Object)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Indicates whether you can remove the original members of the collection.

Namespace:   System.ComponentModel.Design
Assembly:  System.Design (in System.Design.dll)

protected bool CanRemoveInstance(
	object value
)

Parameters

value
Type: System.Object

The value to remove.

Return Value

Type: System.Boolean

true if it is permissible to remove this value from the collection; otherwise, false. By default, this method returns the value from CanRemoveInstance of the CollectionEditor for this form.

When implemented in a derived class, this method indicates whether the specified value can be removed from the collection. By default, this returns the value from CanRemoveInstance of the CollectionEditor for this form.

This method is called when the user tries to remove from the collection an item that is an original member of the collection. This method is not called when removing items that were added in this editing session, because they are not yet part of the collection.

.NET Framework
Available since 1.1
Return to top
Show: