Table of Contents

Class CurveKeyCollection

Namespace
Microsoft.Xna.Framework
Assembly
MonoGame.Framework.dll

The collection of the CurveKey elements and a part of the Curve class.

[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

int

IsReadOnly

Returns false because it is not a read-only collection.

[DataMember]
public bool IsReadOnly { get; }

Property Value

bool

this[int]

Indexer.

[DataMember(Name = "Items")]
public CurveKey this[int index] { get; set; }

Parameters

index int

The index of key in this collection.

Property Value

CurveKey

CurveKey at index position.

Methods

Add(CurveKey)

Adds a key to this collection.

public void Add(CurveKey item)

Parameters

item CurveKey

New 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 item is 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

item CurveKey

The key to locate in this collection.

Returns

bool

true if the key is found; false otherwise.

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

array CurveKey[]

Destination array where elements will be copied.

arrayIndex int

The 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

item CurveKey

Element 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

item CurveKey

The element

Returns

bool

true if item is successfully removed; false otherwise. This method also returns false if item was not found.

RemoveAt(int)

Removes element at the specified index.

public void RemoveAt(int index)

Parameters

index int

The index which element will be removed.