CodeTypeDeclarationCollection.Remove Method (CodeTypeDeclaration)

 

Removes the specified CodeTypeDeclaration object from the collection.

Namespace:   System.CodeDom
Assembly:  System (in System.dll)

public void Remove(
	CodeTypeDeclaration value
)

Parameters

value
Type: System.CodeDom.CodeTypeDeclaration

The CodeTypeDeclaration to remove from the collection.

Exception Condition
ArgumentException

The specified object is not found in the collection.

The following example demonstrates how to use the Remove method to delete a CodeTypeDeclaration object from a CodeTypeDeclarationCollection.

// Removes the specified CodeTypeDeclaration from the collection.
CodeTypeDeclaration declaration = new CodeTypeDeclaration("TestType");
collection.Remove( declaration );

.NET Framework
Available since 1.1
Return to top
Show: