IBindingList.AllowRemove 屬性

定義

取得值,指出您是否可以使用 Remove(Object)RemoveAt(Int32) 從清單移除項目。Gets whether you can remove items from the list, using Remove(Object) or RemoveAt(Int32).

public:
 property bool AllowRemove { bool get(); };
public bool AllowRemove { get; }
member this.AllowRemove : bool
Public ReadOnly Property AllowRemove As Boolean

屬性值

如果您可以從清單移除項目,則為 true,否則為 falsetrue if you can remove items from the list; otherwise, false.

備註

如果IList.IsFixedSize trueIList.IsReadOnly為, 則這個屬性會傳回。 falseIf IList.IsFixedSize or IList.IsReadOnly is true, this property returns false.

注意

AllowRemove 如果傳回IList.Remove,則和IList.RemoveAt會擲NotSupportedException回。 falseIf AllowRemove returns false, IList.Remove and IList.RemoveAt throw a NotSupportedException.

適用於