ConfigurationCollectionAttribute.ClearItemsName ConfigurationCollectionAttribute.ClearItemsName ConfigurationCollectionAttribute.ClearItemsName ConfigurationCollectionAttribute.ClearItemsName Property

Definición

Obtiene o establece el nombre del elemento de configuración <clear>.Gets or sets the name for the <clear> configuration element.

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

Valor de propiedad

Nombre que reemplaza el nombre estándar "clear" para el elemento de configuración.The name that replaces the standard name "clear" for the configuration item.

Ejemplos

En el ejemplo siguiente se muestra cómo utilizar ClearItemsName.The following example shows how to use the 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

Comentarios

La ClearItemsName propiedad le permite asignar un nombre diferente <clear> al elemento de configuración.The ClearItemsName property allows you to assign a different name to the <clear> configuration element. Por ejemplo, puede usar clearUrls en lugar de "Clear".For example, you could use clearUrls instead of "clear".

Se aplica a