Freigeben über


CodeAttributeDeclarationCollection.Remove-Methode

Entfernt die angegebene CodeAttributeDeclaration aus der Auflistung.

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

Syntax

'Declaration
Public Sub Remove ( _
    value As CodeAttributeDeclaration _
)
'Usage
Dim instance As CodeAttributeDeclarationCollection
Dim value As CodeAttributeDeclaration

instance.Remove(value)
public void Remove (
    CodeAttributeDeclaration value
)
public:
void Remove (
    CodeAttributeDeclaration^ value
)
public void Remove (
    CodeAttributeDeclaration value
)
public function Remove (
    value : CodeAttributeDeclaration
)

Parameter

Ausnahmen

Ausnahmetyp Bedingung

ArgumentException

Das angegebene Objekt wurde nicht in der Auflistung gefunden.

Beispiel

' Removes the specified CodeAttributeDeclaration from the collection.
Dim declaration As New CodeAttributeDeclaration("DescriptionAttribute", New CodeAttributeArgument(New CodePrimitiveExpression("Test Description")))
collection.Remove(declaration)
// 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.
array<CodeAttributeArgument^>^temp5 = {gcnew CodeAttributeArgument( gcnew CodePrimitiveExpression( "Test Description" ) )};
CodeAttributeDeclaration^ declaration = gcnew CodeAttributeDeclaration( "DescriptionAttribute",temp5 );
collection->Remove( declaration );
// Removes the specified CodeAttributeDeclaration from 
// the collection.
CodeAttributeDeclaration declaration =
    new CodeAttributeDeclaration("DescriptionAttribute",
    new CodeAttributeArgument[] { new CodeAttributeArgument(
    new CodePrimitiveExpression("Test Description")) });
collection.Remove(declaration);

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

CodeAttributeDeclarationCollection-Klasse
CodeAttributeDeclarationCollection-Member
System.CodeDom-Namespace