Export (0) Print
Expand All

CodeTypeMemberCollection.Remove Method

Removes a specific CodeTypeMember from the collection.

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

public void Remove(
	CodeTypeMember value
)

Parameters

value
Type: System.CodeDom.CodeTypeMember

The CodeTypeMember to remove from the collection.

ExceptionCondition
ArgumentException

The specified object is not found in the collection.

The following code example demonstrates how to use the Remove method to delete a CodeTypeMember object from a CodeTypeMemberCollection.

// Removes the specified CodeTypeMember from the collection.
CodeTypeMember member = new CodeMemberField("System.String", "TestStringField");
collection.Remove( member );

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft