我在 ac# 类库中有以下代码...
public static class foo
{
public enum bar
{
bsNone = -1,
bsSolid = 0,
bsDash = 1
}
}
在 VB.Net Winforms 应用程序中,我将枚举引用为属性的返回类型:
Private _LeftBorderStyle As foo.bar
Public Property LeftBorderStyle() As foo.bar
Get
Return _LeftBorderStyle
End Get
Set(ByVal value As foo.bar)
_LeftBorderStyle = value
End Set
End Property
当我构建 VB.Net 项目时,我收到以下警告:
Return type of function 'LeftBorderStyle' is not CLS-compliant.
你能告诉我为什么枚举不符合 CLS 吗?