Search This Blog

Saturday, 31 January 2015

Stack in C#

Stack is a LIFO collection. It provides a powerful and simple last-in-first-out data structure.
This can help you develop parsers quickly and also replace complex recursive algorithms.
Stack is a generic type.

Types of Methods of Stack

Pop() Removes and returns the object at the top of the System.Collections.Stack.

Push() Inserts an object at the top of the System.Collections.Stack.

Peek() Returns the object at the top of the System.Collections.Stack without removing it.

Referred from :-  http://www.dotnetperls.com/stack

Download Code from below link :- https://app.box.com/s/kplszfmpooytythic1b29u85uhiffo9s

Example :- 



 For calling this class method in void Main.



 Final output :-




2 comments:

  1. This is an amazing blog,it gives very helpful messages to us.Besides that Wisen has established as Best Dot Net Training in Chennai. or learn thru ASP.NET Online Training . Nowadays Dot Net has tons of job opportunities on various vertical industry.

    ReplyDelete
  2. It 's an amazing article and useful for developers
    Dot Net Online Training Bangalore

    ReplyDelete

Angular 6 tutorial for beginners

Angular 6 tutorial for beginners