CodeAttributeDeclarationCollection.Remove(CodeAttributeDeclaration) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從集合中移除指定的 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)