ConfigurationCollectionAttribute.RemoveItemName Proprietà

Definizione

Ottiene o imposta il nome dell'elemento di configurazione <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

Valore della proprietà

Nome che sostituisce il nome standard "remove" dell'elemento di configurazione.

Esempio

Nell'esempio seguente viene illustrato come utilizzare la proprietà 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

Commenti

La RemoveItemName proprietà consente di assegnare un nome diverso all'elemento <remove> di configurazione. Ad esempio, è possibile usare removeUrl invece di "remove".

Si applica a