S
Softex Software house
Guest
Hi, i am using the below data structures all over my large project and i am getting like a zillion warning that these classes (and any forms using them) are not CLS-compliant. any ideas , why and what should be done to make them CLS-compliant ???
thank you in advance
Public Class ObjDateFilter
Public Enabled As Boolean = False
Public FromDate As Integer, ToDate As Integer
Sub New(Enabled_ As Boolean, FromDate_ As Integer, ToDate_ As Integer)
Me.Enabled = Enabled_
Me.FromDate = FromDate_
Me.ToDate = ToDate_
End Sub
Sub New()
'Normal Signature
End Sub
End Class
Public Function GetDateFilterObj(ByVal Enabled_ As Boolean, ByVal FromDate_ As Integer, ByVal ToDate_ As Integer) As ObjDateFilter
Dim result As New ObjDateFilter
With result
.Enabled = Enabled_
.FromDate = FromDate_
.ToDate = ToDate_
End With
Return result
End Function
Public Class ObjRangeFilter
Public Enabled As Boolean = False
Public FromValue As Decimal, ToValue As Decimal
Sub New()
End Sub
Sub New(ByVal Enabled_ As Boolean, ByVal FromValue_ As Integer, ByVal toValue_ As Integer)
Me.Enabled = Enabled_
Me.FromValue = FromValue_
Me.ToValue = toValue_
End Sub
End Class
Public Function GetRangeObj(ByVal Enabled_ As Boolean, ByVal FromDate_ As Integer, ByVal ToDate_ As Integer) As ObjRangeFilter
Dim result As New ObjRangeFilter
With result
.Enabled = Enabled_
.FromValue = FromDate_
.ToValue = ToDate_
End With
Return result
End Function
Public Class ObjCoinFilter
Public Enabled As Boolean, Coin As Integer
End Class
Public Function GetCoinFilterObj(ByVal Enabled_ As Boolean, ByVal Coin_ As Integer) As ObjCoinFilter
Dim Result As New ObjCoinFilter
Result.Enabled = Enabled_ : Result.Coin = Coin_
Return Result
End Function
Public Class ObjAddNewResult
Public Success As Boolean = False, ErrorString As String = "", NewID As Integer, Exception_Obj As Exception
End Class
Continue reading...
thank you in advance
Public Class ObjDateFilter
Public Enabled As Boolean = False
Public FromDate As Integer, ToDate As Integer
Sub New(Enabled_ As Boolean, FromDate_ As Integer, ToDate_ As Integer)
Me.Enabled = Enabled_
Me.FromDate = FromDate_
Me.ToDate = ToDate_
End Sub
Sub New()
'Normal Signature
End Sub
End Class
Public Function GetDateFilterObj(ByVal Enabled_ As Boolean, ByVal FromDate_ As Integer, ByVal ToDate_ As Integer) As ObjDateFilter
Dim result As New ObjDateFilter
With result
.Enabled = Enabled_
.FromDate = FromDate_
.ToDate = ToDate_
End With
Return result
End Function
Public Class ObjRangeFilter
Public Enabled As Boolean = False
Public FromValue As Decimal, ToValue As Decimal
Sub New()
End Sub
Sub New(ByVal Enabled_ As Boolean, ByVal FromValue_ As Integer, ByVal toValue_ As Integer)
Me.Enabled = Enabled_
Me.FromValue = FromValue_
Me.ToValue = toValue_
End Sub
End Class
Public Function GetRangeObj(ByVal Enabled_ As Boolean, ByVal FromDate_ As Integer, ByVal ToDate_ As Integer) As ObjRangeFilter
Dim result As New ObjRangeFilter
With result
.Enabled = Enabled_
.FromValue = FromDate_
.ToValue = ToDate_
End With
Return result
End Function
Public Class ObjCoinFilter
Public Enabled As Boolean, Coin As Integer
End Class
Public Function GetCoinFilterObj(ByVal Enabled_ As Boolean, ByVal Coin_ As Integer) As ObjCoinFilter
Dim Result As New ObjCoinFilter
Result.Enabled = Enabled_ : Result.Coin = Coin_
Return Result
End Function
Public Class ObjAddNewResult
Public Success As Boolean = False, ErrorString As String = "", NewID As Integer, Exception_Obj As Exception
End Class
Continue reading...