Breakpoint at the end of the method hits twice

Viewed 100

I am using IText to generate some basic PDF.

Here the code:

 public void GeneratePdf()
    {
        using var pdfWriter = new PdfWriter("hello.pdf")
        {
            using var pdfDocument = new PdfDocument(pdfWriter)
            {
                using var document = new Document(pdfDocument)
                {
                    document.Add(new Paragraph(_cotizacionVm.InfoSyca.Nombre));
                    document.Add(new Paragraph(_cotizacionVm.InfoSyca.Nombre));
                }
            }
        }
        Console.WriteLine("HI");
    }// The breakpoint here is hit twice

Something strange is happening (at least for me).

The last curly brace of the method is hit twice, no other "HI" is printed.

Can anyone give me an idea of what is going on?

Thanks in advance.

0 Answers
Related