下面的简单类有什么不符合 CLS 的?
我收到警告说我的派生类不符合 CLS,因为它继承自下面不符合 CLS 的类(显然)。
Public MustInherit Class BaseModel
Protected MustOverride Sub SetIDValue(nValue As Long)
End Class
是的 - 以上是该课程的完整代码。
以下是基类和派生类的完整文件:
基类:
Imports System.ComponentModel.DataAnnotations
Namespace Core
Public MustInherit Class BaseModel
Protected MustOverride Sub SetIDValue(nValue As Long)
End Class
End Namespace
派生类:
Imports Snap.Core
Imports System.ComponentModel.DataAnnotations
Public Class SystemValueModel
Inherits BaseModel
Public Sub New()
End Sub
Public ID_SystemValue As Long
<Required()> <StringLength(25)>
Public Token As String
<Required()> <StringLength(255)>
Public Value As String
Protected Overrides Sub SetIDValue(nValue As Long)
'Nada
End Sub
End Class