S
Smokey Grindle
This class is coming up as not CLS compliant, why?
with this warrning
Warning 2 Type 'Account' is not CLS-compliant.
Namespace Accounts
''' <summary>
''' Represents an account
''' </summary>
''' <remarks></remarks>
Public Class Account
Private m_AccountID As Int64
Private m_Name As String = String.Empty
Public Property AccountID() As Int64
Get
Return m_AccountID
End Get
Set(ByVal value As Int64)
m_AccountID = value
End Set
End Property
Public Property Name() As String
Get
Return m_Name.Trim
End Get
Set(ByVal value As String)
m_Name = value
End Set
End Property
Public Sub New()
Me.AccountID = -1
Me.Name = String.Empty
End Sub
Public Sub New(ByVal accountID As Int64, ByVal name As String)
Me.AccountID = accountID
Me.Name = name.Trim
End Sub
Public Overrides Function ToString() As String
Return Me.Name
End Function
End Class
End Namespace
with this warrning
Warning 2 Type 'Account' is not CLS-compliant.
Namespace Accounts
''' <summary>
''' Represents an account
''' </summary>
''' <remarks></remarks>
Public Class Account
Private m_AccountID As Int64
Private m_Name As String = String.Empty
Public Property AccountID() As Int64
Get
Return m_AccountID
End Get
Set(ByVal value As Int64)
m_AccountID = value
End Set
End Property
Public Property Name() As String
Get
Return m_Name.Trim
End Get
Set(ByVal value As String)
m_Name = value
End Set
End Property
Public Sub New()
Me.AccountID = -1
Me.Name = String.Empty
End Sub
Public Sub New(ByVal accountID As Int64, ByVal name As String)
Me.AccountID = accountID
Me.Name = name.Trim
End Sub
Public Overrides Function ToString() As String
Return Me.Name
End Function
End Class
End Namespace