ConfigurationCollectionAttribute.ClearItemsName 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定 <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>
態專案。 例如,您可以使用 clearUrls
,而不是「清除」。