CodeTypeMemberCollection.Remove(CodeTypeMember) 方法

定义

从集合中移除特定的 CodeTypeMember

public:
 void Remove(System::CodeDom::CodeTypeMember ^ value);
public void Remove (System.CodeDom.CodeTypeMember value);
member this.Remove : System.CodeDom.CodeTypeMember -> unit
Public Sub Remove (value As CodeTypeMember)

参数

value
CodeTypeMember

要从该集合中移除的 CodeTypeMember

例外

未在集合中找到指定的对象。

示例

下面的代码示例演示如何使用 Remove 方法从 CodeTypeMemberCollection中删除 CodeTypeMember 对象。

// Removes the specified CodeTypeMember from the collection.
CodeTypeMember^ member = gcnew CodeMemberField( "System.String","TestStringField" );
collection->Remove( member );
// Removes the specified CodeTypeMember from the collection.
CodeTypeMember member = new CodeMemberField("System.String", "TestStringField");
collection.Remove( member );
' Removes the specified CodeTypeMember from the collection.
Dim member = New CodeMemberField("System.String", "TestStringField")
collection.Remove(member)

适用于