【发布时间】:2016-04-28 07:41:11
【问题描述】:
所以我有一个基类和一个继承类。
基类
Friend Overridable Overloads Sub ProcessRecords(ByVal oDataKeyValuePair As KeyValuePair(Of String, Dictionary(Of String, Double)), ByVal oFilterValues As SDFilterCriteria.FilterType)
'does stuff'
End Sub
Friend Overridable Overloads Sub ProcessRecords(ByVal oDataKeyValuePair As KeyValuePair(Of String, Dictionary(Of String, Double)), ByVal oFilterValues As SDFilterCriteria.FilterType, Optional ByVal MaxCount As Integer = 0)
'does stuff'
End Sub
儿童班
Friend Overloads Overrides Sub ProcessRecords(ByVal oDataKeyValuePair As KeyValuePair(Of String, Dictionary(Of String, Double)), ByVal oFilterValues As SDFilterCriteria.FilterType, Optional ByVal MaxCount As Integer = 0)
'does other stuff
End Sub
但是当我构建时我得到了
错误 6
'Friend 重载子 ProcessRecords(oDataKeyValuePair As System.Collections.Generic.KeyValuePair(Of String, System.Collections.Generic.Dictionary(Of String, Double)), oFilterValues As SharedModels.FilterCriteriaBase.FilterType, [MaxCount As Integer = 0])' cannot override 'Friend Overridable Overloads Sub ProcessRecords(oDataKeyValuePair As System.Collections.Generic.KeyValuePair(字符串, System.Collections.Generic.Dictionary(Of String, Double)), oFilterValues As SharedModels.FilterCriteriaBase.FilterType)' 因为 它们因可选参数而异。
我有一种感觉是因为过载,但我似乎无法弄清楚。
【问题讨论】:
标签: vb.net