Class CollectionPlus
A collection base class containing basic extra functionality to be inherited by CurveList, IPointList, GraphObjList.
Inherited Members
Namespace: ZedGraph
Assembly: ZedGraph.dll
Syntax
[Serializable]
public class CollectionPlus : CollectionBase, IList, ICollection, IEnumerable
Remarks
The methods in this collection operate on basic Object types. Therefore, in order to make sure that the derived classes remain strongly-typed, there are no Add() or Insert() methods here, and no methods that return an object. Only Remove(), Move(), IndexOf(), etc. methods are included.
Constructors
| Improve this Doc View SourceCollectionPlus()
Default Constructor
Declaration
public CollectionPlus()
Methods
| Improve this Doc View SourceIndexOf(Object)
Return the zero-based position index of the specified object in the collection.
Declaration
public int IndexOf(object item)
Parameters
Type | Name | Description |
---|---|---|
Object | item | A reference to the object that is to be found. |
Returns
Type | Description |
---|---|
Int32 | The zero-based index of the specified object, or -1 if the object is not in the list |
See Also
| Improve this Doc View SourceMove(Int32, Int32)
Move the position of the object at the specified index to the new relative position in the list.
Declaration
public int Move(int index, int relativePos)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | The zero-based index of the object to be moved. |
Int32 | relativePos | The relative number of positions to move the object. A value of -1 will move the object one position earlier in the list, a value of 1 will move it one position later. To move an item to the beginning of the list, use a large negative value (such as -999). To move it to the end of the list, use a large positive value. |
Returns
Type | Description |
---|---|
Int32 | The new position for the object, or -1 if the object was not found. |
Remarks
For Graphic type objects, this method controls the Z-Order of the items. Objects at the beginning of the list appear in front of objects at the end of the list.
Remove(Int32)
Remove an object from the collection at the specified ordinal location.
Declaration
public void Remove(int index)
Parameters
Type | Name | Description |
---|---|---|
Int32 | index | An ordinal position in the list at which the object to be removed is located. |
See Also
| Improve this Doc View SourceRemove(Object)
Remove an object from the collection based on an object reference.
Declaration
public void Remove(object item)
Parameters
Type | Name | Description |
---|---|---|
Object | item | A reference to the object that is to be removed. |