You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't recommend that you use the ArrayList class for new development. Instead, we recommend that you use the generic List class. The ArrayList class is designed to hold heterogeneous collections of objects. However, it does not always offer the best performance. Instead, we recommend the following:
For a heterogeneous collection of objects, use the List<Object> (in C#) or List(Of Object) (in Visual Basic) type.
For a homogeneous collection of objects, use the List<T> class. See Performance Considerations in the List reference topic for a discussion of the relative performance of these classes. See Non-generic collections shouldn't be used on GitHub for general information on the use of generic instead of non-generic collection types.
The ArrayList.Add method returns an index of the added element which often unintendedly pollutes the PowerShell pipeline and causes unexpected issues, see e.g.: