I just convert the C# function to VB.NET function but somehow I get some error. Below is my C# function.
public abstract class BaseFilterControl: UserControl,IFilterControl
{
public string PropertyName { get; set; }
public FilterDescriptorBase AssociatedDescriptor { get; set; }
public bool IsFirst { get; set; }
public abstract FilterDescriptorBase BuildDescriptor();
protected abstract void Initialize();
}
Below is my current VB function
Public MustInherit Class BaseFilterControl
Inherits UserControl
Implements IFilterControl
Public Property PropertyName As String
Public Property AssociatedDescriptor As FilterDescriptorBase
Public Property IsFirst As Boolean
Public MustOverride Function BuildDescriptor() As FilterDescriptorBase
Protected MustOverride Sub Initialize()
End Class
I got this error:
BaseFilterControl must implement Function BuildDescriptor() As FilterDescriptorBase.
Any idea. Please help. Thanks
An abstract method implementing an interface method in fine. In VB, you just need to specify that the function implements the interface function:
Public MustOverride Function BuildDescriptor() As FilterDescriptorBase Implements IFilterControl.BuildDescriptor
You might need to add more "Implements" clauses for other methods - I'm not familiar with the IFilterControl interface.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.