If you're going to have atleast more than 5-6 then I wouldn't suggest using my.settings. There is a stringcollection type setting, but since X is an integer I wouldn't suggest using that. If security isn't an issue, then a textfile would suffice. If security is a bit more of an issue then I would use a sql/access database. Either way is easy to use. If you want the data to save when the form is closing then put the code to update the array in your form_closing event. An example of using e.Cancel in the form_closing would be:
Code:
Private Sub Form1_FormClosing(sender As Object, e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
If MessageBox.Show("Do you want to close?", Me.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.No Then
e.Cancel = True
End If
End Sub
Also, might I suggest using a loop to set those arrays? Something like this:
Code:
Dim x(6) As Integer
For i As Integer = 0 To x.Count
x(i) = i
Next
It's a little easier on the fingers :P