IBindingList.AllowRemove Property

Definition

取得值,指出您是否可以使用 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

Property Value

Boolean

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

Remarks

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

Note

如果 AllowRemove 傳回 falseIList.RemoveIList.RemoveAt 會擲回 NotSupportedExceptionIf AllowRemove returns false, IList.Remove and IList.RemoveAt throw a NotSupportedException.

Applies to