Hi. I was given the following code that I use to save a list of items
against a class object. I want to be able to assign this to a Setting
How do I do this so that when I close and open the project I can
reuse the list?
Module Module1
Sub Main()
Dim objCls As New Class1
objCls.JointTables = "Tab1"
objCls.JointTables = "Tab2"
objCls.JointTables = "Tab3"
objCls.JointTables = "Tab2"
End Sub
End Module
Public Class Class1
Private _pJoinTables As String
Public Sub New()
_pJoinTables = ""
End Sub
Property JointTables() As String
Get
Return _pJoinTables
End Get
Set(ByVal sValue As String)
If (Not _pJoinTables.Contains(sValue)) Then
_pJoinTables = _pJoinTables & "," & sValue 'Error on this line first &
End If
End Set
End Property
End Class
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.
The Distinguished Expert awards are presented to the top veteran and rookie experts to earn the most points in the top 50 topics.