Powershell:New-Object

Listen:

Collection Namespaces:

MSDN: System.Collections.Concurrent-Namespace
MSDN: System.Collections.Generic-Namespace
MSDN: System.Collections.ObjectModel-Namespace
MSDN: System.Collections.Specialized-Namespace

System.Collections.Queue[<T>]

$Local:Common_Queue_Obj  =  New-Object -TypeName System.Collections.Generic.Queue[System.String]
    $Common_Queue_Obj.Enqueue("Linie 1")
    $Common_Queue_Obj.Enqueue("Linie 2")
    $Common_Queue_Obj.Enqueue("Linie 3")
while ($Common_Queue_Obj.Count) { $Common_Queue_Obj.Dequeue() }

MSDN: System.Collections.Queue

System.Collections.Specialized.StringCollection

$Local:Common_StringCollection_Obj  =  New-Object -TypeName System.Collections.Specialized.StringCollection
$Common_StringCollection_Obj.AddRange( @("Munich", "Berlin", "Hamburg") )

MSDN: System.Collections.Specialized.StringCollection

Tabellen:

System.Data.DataTable

$Local:Common_DataTable_Obj             = New-Object -TypeName System.Data.DataTable
    # define columns
    $Common_DataTable_Obj.Columns.Add("Country", ([System.String])) | Out-Null
    $Common_DataTable_Obj.Columns[0].AllowDBNull = $false
    $Common_DataTable_Obj.Columns[0].Unique      = $true
    $Common_DataTable_Obj.Columns.Add("Capital", ([System.String])) | Out-Null

$Local:Current_DataRow_Row = $Common_DataTable_Obj.NewRow()
    $Current_DataRow_Row.Country = "Germany"
    $Current_DataRow_Row.Capital = "Berlin"
    $Common_DataTable_Obj.Rows.Add($Current_DataRow_Row)
            # OR 
    $Common_DataTable_Obj.Rows.Add("France", "Paris") | Out-Null

MSDN: System.Data-Namespace
MSDN: System.Data.DataTable-Class
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License