K
K
Can anyone tell me why VB can successfully inherit from the
ControlCollection class but C# can't?
When compiling the following 2 classes, the C# version gets a compile error
of:
"No overload for method 'ControlCollection' takes '0' arguments"
// C#
public class Class1 : System.Windows.Forms.Form.ControlCollection
{
public Class1(System.Windows.Forms.Control owner)
{
}
}
' Visual Basic
Public Class Class11
Inherits System.Windows.Forms.Form.ControlCollection
Public Sub New(ByVal owner As System.Windows.Forms.Control)
End Sub
End Class
ControlCollection class but C# can't?
When compiling the following 2 classes, the C# version gets a compile error
of:
"No overload for method 'ControlCollection' takes '0' arguments"
// C#
public class Class1 : System.Windows.Forms.Form.ControlCollection
{
public Class1(System.Windows.Forms.Control owner)
{
}
}
' Visual Basic
Public Class Class11
Inherits System.Windows.Forms.Form.ControlCollection
Public Sub New(ByVal owner As System.Windows.Forms.Control)
End Sub
End Class