次の方法で共有


ConfigurationCollectionAttribute.RemoveItemName プロパティ

定義

<remove> 構成要素の名前を取得または設定します。

public:
 property System::String ^ RemoveItemName { System::String ^ get(); void set(System::String ^ value); };
public string RemoveItemName { get; set; }
member this.RemoveItemName : string with get, set
Public Property RemoveItemName As String

プロパティ値

構成要素において、標準名 "remove" に代わる名前。

RemoveItemName プロパティを使用する方法を次の例に示します。

// Declare the Urls collection property using the
// ConfigurationCollectionAttribute.
// This allows to build a nested section that contains
// a collection of elements.
[ConfigurationProperty("urls", IsDefaultCollection = false)]
[ConfigurationCollection(typeof(UrlsCollection),
    AddItemName = "add",
    ClearItemsName = "clear",
    RemoveItemName = "remove")]
public UrlsCollection Urls
{
    get
    {
        UrlsCollection urlsCollection =
            (UrlsCollection)base["urls"];
        return urlsCollection;
    }
}
' Declare the Urls collection property using the
' ConfigurationCollectionAttribute.
' This allows to build a nested section that contains
' a collection of elements.
<ConfigurationProperty("urls", IsDefaultCollection:=False),
    System.Configuration.ConfigurationCollection(GetType(UrlsCollection),
    AddItemName:="add", ClearItemsName:="clear", RemoveItemName:="remove")> _
Public ReadOnly Property Urls() As UrlsCollection
    Get
        Dim urlsCollection As UrlsCollection = CType(MyBase.Item("urls"), UrlsCollection)
        Return urlsCollection
    End Get
End Property

注釈

RemoveItemNameプロパティを使用すると、構成要素に別の名前を<remove>割り当てることができます。 たとえば、"remove" の代わりに を使用 removeUrl できます。

適用対象