Behind the PowerShell Pipeline logo

Behind the PowerShell Pipeline

Subscribe
Archives
May 26, 2022

Collections in Action

In the last article, I introduced the generic collection, a terrific alternative to using an array. Especially if you need to modify the array contents. A generic collection typically performs better than an array and, as you’ll see in this article, offers some intriguing scripting possibilities. I want to dive a little deeper into a generic collection, demonstrate methods, and provide an example of how you might use one. Let’s begin by comparing what methods we have from an array compared to a generic collection. We looked briefly at methods last time, but I need to show you more.

Comparing Methods

To compare methods, I’ll create a list object for a generic collection of integers.

Want to read the full issue?
GitHub Bluesky LinkedIn About Jeff
Powered by Buttondown, the easiest way to start and grow your newsletter.