Class CurveKeyCollection
[DataContract]
public class CurveKeyCollection : ICollection<CurveKey>, IEnumerable<CurveKey>, IEnumerable
- Inheritance
-
CurveKeyCollection
- Implements
- Inherited Members
Constructors
CurveKeyCollection()
Creates a new instance of CurveKeyCollection class.
public CurveKeyCollection()
Properties
Count
Returns the count of keys in this collection.
[DataMember]
public int Count { get; }
Property Value
IsReadOnly
Returns false because it is not a read-only collection.
[DataMember]
public bool IsReadOnly { get; }
Property Value
this[int]
Indexer.
[DataMember(Name = "Items")]
public CurveKey this[int index] { get; set; }
Parameters
indexintThe index of key in this collection.
Property Value
Methods
Add(CurveKey)
Adds a key to this collection.
public void Add(CurveKey item)
Parameters
itemCurveKeyNew key for the collection.
Remarks
The new key would be added respectively to a position of that key and the position of other keys.
Exceptions
- ArgumentNullException
Throws if
itemis null.
Clear()
Removes all keys from this collection.
public void Clear()
Clone()
Creates a copy of this collection.
public CurveKeyCollection Clone()
Returns
- CurveKeyCollection
A copy of this collection.
Contains(CurveKey)
Determines whether this collection contains a specific key.
public bool Contains(CurveKey item)
Parameters
itemCurveKeyThe key to locate in this collection.
Returns
- bool
trueif the key is found;falseotherwise.
CopyTo(CurveKey[], int)
Copies the keys of this collection to an array, starting at the array index provided.
public void CopyTo(CurveKey[] array, int arrayIndex)
Parameters
arrayCurveKey[]Destination array where elements will be copied.
arrayIndexintThe zero-based index in the array to start copying from.
GetEnumerator()
Returns an enumerator that iterates through the collection.
public IEnumerator<CurveKey> GetEnumerator()
Returns
- IEnumerator<CurveKey>
An enumerator for the CurveKeyCollection.
IndexOf(CurveKey)
Finds element in the collection and returns its index.
public int IndexOf(CurveKey item)
Parameters
itemCurveKeyElement for the search.
Returns
- int
Index of the element; or -1 if item is not found.
Remove(CurveKey)
Removes specific element.
public bool Remove(CurveKey item)
Parameters
itemCurveKeyThe element
Returns
- bool
trueif item is successfully removed;falseotherwise. This method also returnsfalseif item was not found.
RemoveAt(int)
Removes element at the specified index.
public void RemoveAt(int index)
Parameters
indexintThe index which element will be removed.