次の方法で共有


CodeAttributeDeclarationCollection.Remove メソッド

指定した CodeAttributeDeclaration をコレクションから削除します。

名前空間: System.CodeDom
アセンブリ: System (system.dll 内)

構文

'宣言
Public Sub Remove ( _
    value As CodeAttributeDeclaration _
)
'使用
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
)

パラメータ

例外

例外の種類 条件

ArgumentException

指定したオブジェクトがコレクション内で見つかりません。

使用例

' 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);

プラットフォーム

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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。

バージョン情報

.NET Framework

サポート対象 : 2.0、1.1、1.0

参照

関連項目

CodeAttributeDeclarationCollection クラス
CodeAttributeDeclarationCollection メンバ
System.CodeDom 名前空間