Cyotek.Collections.Generic.CircularBuffer Represents a first-in, first-out collection of objects using a fixed buffer and automatic overwrite support. Specifies the type of elements in the buffer. The capacity of a is the number of elements the can hold. If an attempt is made to put more items in the buffer than available capacity, items at the start of the buffer are automatically overwritten. This behavior can be modified via the property. CircularBuffer{T} accepts null as a valid value for reference types and allows duplicate elements. The methods will remove the items that are returned from the CircularBuffer{T}. To view the contents of the CircularBuffer{T} without removing items, use the or methods. Initializes a new instance of the class that is empty and has the specified initial capacity and default overwrite behavior. The maximum capcity of the buffer. Initializes a new instance of the class that is empty and has the specified initial capacity and overwrite behavior. The maximum capcity of the buffer. If set to true the buffer will automatically overwrite the oldest items when full. Thown if the is less than zero. Removes all items from the . Determines whether the contains a specific value. The object to locate in the . true if is found in the ; otherwise, false. Copies the entire to a compatible one-dimensional array, starting at the beginning of the target array. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. Copies the entire to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. Copies a range of elements from the to a compatible one-dimensional array, starting at the specified index of the target array. The zero-based index in the source at which copying begins. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. The number of elements to copy. Removes and returns the specified number of objects from the beginning of the . The number of elements to remove and return from the . The objects that are removed from the beginning of the . Copies and removes the specified number elements from the to a compatible one-dimensional array, starting at the beginning of the target array. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The actual number of elements copied into . Copies and removes the specified number elements from the to a compatible one-dimensional array, starting at the specified index of the target array. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. The number of elements to copy. The actual number of elements copied into . Removes and returns the object at the beginning of the . The object that is removed from the beginning of the . Thrown if the buffer is empty. This method is similar to the method, but Peek does not modify the . Returns an enumerator that iterates through the . A for the . Returns the object at the beginning of the without removing it. The object at the beginning of the . Thrown if the buffer is empty. Returns the specified number of objects from the beginning of the . The number of elements to return from the . The objects that from the beginning of the . Thrown if the buffer is empty. Returns the object at the end of the without removing it. The object at the end of the . Thrown if the buffer is empty. Copies an entire compatible one-dimensional array to the . The one-dimensional that is the source of the elements copied to . The must have zero-based indexing. Thrown if buffer does not have sufficient capacity to put in new items. If plus the size of exceeds the capacity of the and the property is true, the oldest items in the are overwritten with . Copies a range of elements from a compatible one-dimensional array to the . The one-dimensional that is the source of the elements copied to . The must have zero-based indexing. The zero-based index in at which copying begins. The number of elements to copy. Thrown if buffer does not have sufficient capacity to put in new items. If plus exceeds the capacity of the and the property is true, the oldest items in the are overwritten with . Adds an object to the end of the . The object to add to the . The value can be null for reference types. Thrown if buffer does not have sufficient capacity to put in new items. If already equals the capacity and the property is true, the oldest item in the is overwritten with . Increments the starting index of the data buffer in the . The number of elements to increment the data buffer start index by. Copies the elements to a new array. A new array containing elements copied from the . The is not modified. The order of the elements in the new array is the same as the order of the elements from the beginning of the to its end. Copies the elements of the to an , starting at a particular index. The one-dimensional that is the destination of the elements copied from . The must have zero-based indexing. The zero-based index in at which copying begins. Adds an item to the . The object to add to the . Removes the first occurrence of a specific object from the . The object to remove from the . true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . Cannot remove items from collection. Returns an enumerator that iterates through the collection. A that can be used to iterate through the collection. Returns an enumerator that iterates through a collection. An object that can be used to iterate through the collection. Gets or sets a value indicating whether the buffer will automatically overwrite the oldest items in the buffer when the maximum capacity is reached. true if the oldest items in the buffer are automatically overwritten when the buffer is full; otherwise, false. Gets or sets the total number of elements the internal data structure can hold. The total number of elements that the can contain. Thrown if the specified new capacity is smaller than the current contents of the buffer. Gets the index of the beginning of the buffer data. The index of the first element in the buffer. Gets a value indicating whether the buffer is empty. true if buffer is empty; otherwise, false. Gets a value indicating whether the buffer is full. true if the buffer is full; otherwise, false. The property always returns false if the property is set to true. Gets the number of elements contained in the . The number of elements contained in the . Gets the index of the end of the buffer data. The index of the last element in the buffer. Gets the number of elements contained in the . The number of elements actually contained in the . Gets a value indicating whether access to the is synchronized (thread safe). true if access to the is synchronized (thread safe); otherwise, false. In the default implementation of , this property always returns false. Gets an object that can be used to synchronize access to the . An object that can be used to synchronize access to the Gets the number of elements contained in the . The number of elements actually contained in the . Gets a value indicating whether the is read-only. true if the is read-only; otherwise, false. In the default implementation of , this property always returns false.