CodeAttributeDeclarationCollection.Remove(CodeAttributeDeclaration) Metod
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Tar bort det angivna CodeAttributeDeclaration objektet från samlingen.
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)
Parametrar
- value
- CodeAttributeDeclaration
Objektet CodeAttributeDeclaration som ska tas bort från samlingen.
Undantag
Det angivna objektet hittades inte i samlingen.
Exempel
I följande exempel visas hur du använder Remove metoden för att ta bort ett CodeAttributeDeclaration objekt från 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)