2
我只是將C#函數轉換爲VB.NET函數,但不知何故,我得到一些錯誤。以下是我的C#函數。VB.NET必須實現錯誤
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();
}
下面是我目前的VB功能
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
我得到這個錯誤:
BaseFilterControl must implement Function BuildDescriptor() As FilterDescriptorBase.
任何想法。請幫忙。謝謝
這聽起來像你需要一個BuildDescriptor()的實現,而不是一個抽象的方法。 – Casey
@emodendroket爲什麼,如果是抽象/ MustOverride? – user2864740
@emodendroket。我應該怎麼做? – user2156169