I think what you want to do here can be done so much more simply by
extending the 'Stack Class:
using System.Collections.Generic;
using System.IO;
namespace WFTemplate_Aug2020
{
public class StackPopEx<T> : Stack<T>
{
public StackPopEx(params T[] values)
{
foreach(T itm in values) Push(itm);
}
public void PopEx(int npops)
{
if (npops <= 0)
{
throw new InvalidDataException($"npops = {npops} <= 0");
}
if (npops > Count)
{
throw new InvalidDataException($"npops = {npops} greater than stack count: {Count}");
}
for (int i = 0; i < npops; i++)
{
Pop();
}
}
}
}