Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27437

VS 2010 Reading from My.Settings

$
0
0
By the title it sounds simple, but here are some details:

I used this code to write to the settings:
Code:

        For Each A_Word In MainForm.LBoxBadWords.Items
            A_S.BadWords.Add(A_Word.ToString)
            MsgBox(A_Word)
        Next

Yes, I'm writing information from one form using another, maybe a little inefficient (Maybe the cause of the error, even though I don't think so)

And here is the code that should read from it:
Code:

            For I As Integer = 0 To A_S.BadWords.Count - 1
                LBoxBadWords.Items.Add(A_S.BadWords.Item(I))
            Next

Also, "A_S" is declared by "Dim A_S = My.Settings"

And the error I'm getting is this:
Name:  Error Image.png
Views: 75
Size:  19.5 KB
Attached Images
 

Viewing all articles
Browse latest Browse all 27437


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>