Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

Generic Stack in c#

public class Stack<T>
{
  int position;
  T[] data = new T[100];
  public void Push (T obj)  => data[position++] = obj;
  public T Pop()            => data[--position];
}
Source by learning.oreilly.com #
 
PREVIOUS NEXT
Tagged: #Generic #Stack
ADD COMMENT
Topic
Name
2+3 =