ConfigurationCollectionAttribute.ClearItemsName プロパティ

定義

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

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

プロパティ値

構成項目において、標準名 "clear" に代わる名前。

次の例は、 を使用する方法を ClearItemsName示しています。

// 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

注釈

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

適用対象