hi friends.! need little help. I couldn't find the way to check a stack is empty before pop up a element. when my program is running its give a error. please help me guys.. thank you in advance....
baby_c
37
Junior Poster
Recommended Answers
Jump to PostDo you have a code sample that is failing?
You can use the .Count property or (if you're using Linq) the .Any() method.
using System; using System.Collections.Generic; using System.Linq; namespace DW_404932_CS_CON { class Program { static void Main(string[] args) { Stack<string> stk_str = new Stack<string>(20); string …
All 4 Replies
thines01
401
Postaholic
Team Colleague
Featured Poster
baby_c
commented:
thank you from baby_C
+3
baby_c
37
Junior Poster
baby_c
37
Junior Poster
thines01
401
Postaholic
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.