ConfigurationCollectionAttribute.RemoveItemName 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置 <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>
。 例如,可以使用 removeUrl
而不是“remove”。