CodeAttributeDeclarationCollection.Remove(CodeAttributeDeclaration) Метод

Определение

Удаляет указанный CodeAttributeDeclaration объект из коллекции.

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

Параметры

value
CodeAttributeDeclaration

CodeAttributeDeclaration Объект, который нужно удалить из коллекции.

Исключения

Указанный объект не найден в коллекции.

Примеры

В следующем примере показано, как использовать Remove метод для удаления CodeAttributeDeclaration объекта из объекта CodeAttributeDeclarationCollection.

// Removes the specified CodeAttributeDeclaration from
// the collection.
CodeAttributeDeclaration declaration = new CodeAttributeDeclaration("DescriptionAttribute", new CodeAttributeArgument(new CodePrimitiveExpression("Test Description")) );
collection.Remove( declaration );
' Removes the specified CodeAttributeDeclaration from the collection.
Dim declaration As New CodeAttributeDeclaration("DescriptionAttribute", New CodeAttributeArgument(New CodePrimitiveExpression("Test Description")))
collection.Remove(declaration)

Применяется к