Stack push and pop in C#

Stack<string> myStack = new Stack<string>() ; 
void addRecord(string move) 
{ 
	myStack.Push(move); 
} 
string GetLastRecord() 
{ 
	return myStack.Pop(); 
}

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.