<p>If I have 2 DataTables (dtOne and dtTwo) and I want to merge them and put them in another DataTable (dtAll).  How can I do this in C#?  I tried the Merge statement on the datatable, but this returns void.  Does Merge preserve the data?  For example, if I do:</p>

<pre><code> dtOne.Merge(dtTwo);
</code></pre>

<p>Does dtOne change or does dtTwo change and if either one changes, do the changes preserve?</p>

<p>I know I can't do this because Merge returns void, but I want to be able to store the Merger of both dtOne and dtTwo in dtAll:</p>

<pre><code>//Will Not work, How do I do this
dtAll = dtOne.Merge(dtTwo);
</code></pre>

The
```
Merge
```
method takes the values from the second table and merges them in with the first table, so the first will now hold the values from both.
If you want to preserve both of the original tables, you could copy the original first, then merge:
```
```
dtAll = dtOne.Copy();
dtAll.Merge(dtTwo);
```
```