20-11-20 01:06 AM
20-11-20 05:31 AM
' Inputs: Collection A, Collection B
' Outputs: Collection Out
Collection_Out = Collection_A
For Each Column As DataColumn In Collection_B.Columns
If Not Collection_Out.Columns.Contains(Column.ColumnName) Then
Collection_Out.Columns.Add(Column.ColumnName, Column.DataType)
End If
Next
For Each Row As DataRow In Collection_B.Rows
Dim NewRow As DataRow = Collection_Out.NewRow
For Each Column As DataColumn In Collection_B.Columns
NewRow(Column.ColumnName) = Row(Column.ColumnName)
Next
Collection_Out.Rows.Add(NewRow)
Next