troubleshooting Question save a list to settings

Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland asked on
Visual Basic.NET
2 Comments1 Solution357 ViewsLast Modified:
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
            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
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros