From 6ae360f3bc9f029e71a27226a85728cd28d45e97 Mon Sep 17 00:00:00 2001 From: Luke Else Date: Sun, 17 Apr 2022 22:17:53 +0100 Subject: [PATCH] Added GetCount method to Stack --- C#/Datastructures/Stack/Stack.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/C#/Datastructures/Stack/Stack.cs b/C#/Datastructures/Stack/Stack.cs index 8d845fe..8472380 100644 --- a/C#/Datastructures/Stack/Stack.cs +++ b/C#/Datastructures/Stack/Stack.cs @@ -55,5 +55,10 @@ namespace C_.Datastructures.Stack } return default; } + + public int GetCount() + {//Return the number of items in the list + return Count; + } } } \ No newline at end of file