G
Guillaume Hanique
Hello,
I want to extend the datarowview, but I don't know how.
If I have:
Public Class MyClass
Inherits DataRowView
End Class
It says:
Class 'MyClass' must declare a 'Sub New' because its base class
'DataRowView' does not have an accessible 'Sub New' that can be called
with no arguments.
If then I have:
Public Class MyClass
Inherits DataRowView
Public Sub New()
End Sub
End Class
It says:
First statement of this 'Sub New' must be a call to 'MyBase.New' or
'MyClass.New' because base class 'System.Data.DataRowView' of
'SOSMailer.Class1' does not have an accessible 'Sub New' that can be
called with no arguments.
But the base class, datarowview, doesn't have a New method. And typing
MyClass.New as the first statement is nonsense. It would be a call to
itself. Anybody any idea? Or is it simply not possible to subclass any
class that doesn't have a constructor?
Thanks, Guillaume Hanique.
I want to extend the datarowview, but I don't know how.
If I have:
Public Class MyClass
Inherits DataRowView
End Class
It says:
Class 'MyClass' must declare a 'Sub New' because its base class
'DataRowView' does not have an accessible 'Sub New' that can be called
with no arguments.
If then I have:
Public Class MyClass
Inherits DataRowView
Public Sub New()
End Sub
End Class
It says:
First statement of this 'Sub New' must be a call to 'MyBase.New' or
'MyClass.New' because base class 'System.Data.DataRowView' of
'SOSMailer.Class1' does not have an accessible 'Sub New' that can be
called with no arguments.
But the base class, datarowview, doesn't have a New method. And typing
MyClass.New as the first statement is nonsense. It would be a call to
itself. Anybody any idea? Or is it simply not possible to subclass any
class that doesn't have a constructor?
Thanks, Guillaume Hanique.