Creating a list

A generic list must have a type declared. A generic list, in this case a list of strings, is created as follows:

$list = New-Object System.Collections.Generic.List[String] 

ArrayList is created in a similar manner. ArrayList cannot have the type declared:

$arrayList = New-object System.Collections.ArrayList 

Once created, ArrayList may be used in much the same way as a generic list.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.144.69