Now, give a code with the same functionality, but made in C#.
Sure. Use PDFSharp to do this:

```
PdfReader first = PdfReader.Open(file1.pdf, PdfDocumentOpenMode.Import))
PdfReader second = PdfReader.Open(file1.pdf, PdfDocumentOpenMode.Import))

for (int i = 0; i < second.PageCount; i++)
        first.AddPage(second.Pages[i]);

second.Save(output.pdf)
```