Don’t do that #15: Use Add method when creating an array with multiple elements

By | April 10, 2015

Don’t do that: An empty array is created and then the elements are added.


Do that: There are several ways to do that with one-liners:


previous-buttonnext-button

2 thoughts on “Don’t do that #15: Use Add method when creating an array with multiple elements

  1. Pingback: Don’t do that #14 : Use Add method to multiple elements when creating an hashtable - Powershell Guru

  2. Pingback: Don’t do that #14: Use Add method when creating a hashtable with multiple elements | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *