private static void PooledStack_Simple_Impl(StackPool <string> pool) { for (var i = 0; i < 100; i++) { using var obj = i % 2 == 0 ? pool.New() : PooledStack <string> .New(pool); var stack = obj.Stack; Assert.AreEqual(0, stack.Count); stack.Push("qux"); stack.Push("foo"); stack.Push("bar"); stack.Push("baz"); Assert.IsTrue(exp.SequenceEqual(stack)); } }