VB -> C#: Overloads modifier should not always be converted to new modifier #351
Labels
compilation error
A bug where the converted output won't compile
duplicate
VB -> C#
Specific to VB -> C# conversion
This code:
protected new override void Dispose(bool Disposing)
Is issuing error CS0113 on all forms in the project.
Error CS0113 A member 'frmLicenseAgreement.Dispose(bool)' marked as override cannot be marked as new or virtual MTCB C:\AngelSpeaksSoftware-2019\MyTalking Communicator\frmLicenseAgreement.Designer.cs 21 Active
Original VB code:
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
Converted C# code:
// Form overrides dispose to clean up the component list.
[System.Diagnostics.DebuggerNonUserCode()]
protected new override void Dispose(bool Disposing)
{
if (Disposing)
{
if (!(components == null))
components.Dispose();
}
base.Dispose(Disposing);
}
The text was updated successfully, but these errors were encountered: