Mono Class Library: System.Collections.IList Overview | MembersSystem.Collections.IList.IsFixedSize Property |
Gets a bool value indicating whether the current instance has a fixed size. [Edit]
|
true if the current instance has a fixed size; otherwise, false. [Edit]
This property is read-only.
Note: A collection with a fixed size does not allow the addition or removal of elements, but it allows the modification of existing elements.Operation
Any method that adds or removes an element of a collection is required to check the value of this property for the particular collection before adding or removing elements. If the value of this property is false, any attempt to add or remove an element of the current instance is required to throw a NotSupportedException.The default of this property is false.
Note to Inheritors
Override this property, setting the value to true, in order to prevent the addition or removal of elements in the current instance.Usage
Use IList.IsFixedSize to secure the current instance from modification from methods, such as IList.Add(object) and IList.Remove(object), which add or remove elements from a list. [Edit]
Namespace: System.Collections
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0