АкушерствоАнатомияАнестезиологияВакцинопрофилактикаВалеологияВетеринарияГигиенаЗаболеванияИммунологияКардиологияНеврологияНефрологияОнкологияОториноларингологияОфтальмологияПаразитологияПедиатрияПервая помощьПсихиатрияПульмонологияРеанимацияРевматологияСтоматологияТерапияТоксикологияТравматологияУрологияФармакологияФармацевтикаФизиотерапияФтизиатрияХирургияЭндокринологияЭпидемиология
|
Stacks in C#
A stack is another container that is very similar to the queue. You just use different methods to access the stack. The item that is added last to the stack is read first. The stack is a last in, first out (LIFO) container.
The Stack<T>class implements the interfaces IEnumerable<T>and ICollection.
Members
| Description
| Count
| The property Count returns the number of items in the stack.
| Push()
| The Push() method adds an item on top of the stack.
| Pop()
| The Pop() method removes and returns an item from the top of the stack. If the stack is empty, an exception of type InvalidOperationException is thrown.
| Peek()
| The Peek() method returns an item from the top of the stack but does not remove the item.
| Contains()
| The Contains() method checks whether an item is in the stack and returns true if it is
|
.
Дата добавления: 2015-09-18 | Просмотры: 516 | Нарушение авторских прав
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 |
|