Skip to content

Instantly share code, notes, and snippets.

@ElysiumWhale
ElysiumWhale / LimitedSizeStack.cs
Created Mar 26, 2021
Stack-like working collection class which drops bottom value while adding new value if store is full
View LimitedSizeStack.cs
public class LimitedSizeStack<T>
{
private int _count;
private int _index;
private int _limit;
private T[] _data;
public int Count => _count;
public int Limit => _limit;