这在 vb Do '' Bgw1 = Backgroundworker1 中意味着什么?以及如何将其转换为 csharp?

What this mean in vb Do '' Bgw1 = Backgroundworker1 ? And how to convert it to csharp?

在我的 form1 设计器中,我只有一个 backgroundworker 名称:Bgw1,但我没有 backgroundworker1,不在设计器中,也不在代码中。

Do       '' Bgw1 = Backgroundworker1
            If Bgw1.CancellationPending Then ' Have we pressed Cancel?
                Exit Sub

在 Visual Basic 中,' 字符开始注释。在 C# 中,注释以 // 开头。

在这种情况下,您最好不要将其转换为 C#,因为它似乎具有误导性。