C# Beginner to advanced - Lesson 53 - Collections - Part 4 - Stack

مجله خبری، آموزشی پرشین تک
منتشر شده در 11 خرداد 1397

Stack:


C# includes a special type of collection which stores elements in LIFO style(Last In First Out).

C# includes a generic and non-generic Stack. Here, we are going to learn about the non-generic stack.

Stack stores the values in LIFO (Last in First out) style. The element which is added last will be the element to come out first.

Use the Push() method to add elements into Stack.

The Pop() method returns and removes elements from the top of the Stack. Calling the Pop() method on the empty Stack will throw an exception.

The Peek() method always returns top most element in the Stack.


ankpro

ankpro training

Asp.net MVC

C#

C sharp

Bangalore

Rajajinagar

Selenium

Coded UI

Mobile automation testing

Mobile testing

JQuery

JavaScript

.Net

Components of the .Net framework

Hello World

Literal

Keywords

Variable

Data types

Operators

Branching

Loops

Arrays

ArrayList

Strings

String Builder

Structures

Enums

Functions

Classes

Inheritance

Polymorphism

Properties

Indexers

Events

Nested Classes

Delegates

Anonymous methods

Labda expressions

Abstract classes

Exception Handling

Linq

Interfaces

Extension methods

Anonymous types

Generics

Collections

Garbage Collection

Reflection

Attributes

Input and output statements

Type casting

Partial Methods

Partial Classes

Boxing and Unboxing

Var vs Dynamic vs Object

دیدگاه کاربران