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 수 있습니다.

적용 대상