Dim slist As new List(of String)
Do While slist.count<2
Dim s As Integer = Rand.Next(1,5)
If slist.Contains(s)=False Then
If slist.count>0 Then
If (slist(0)-s)>1 OrElse (slist(0)-s)<-1 Then
slist.Add(s)
End If
Else
slist.Add(s)
End If
End If
Loop
Dim str As String
For Each s As String In slist
str=str & s
Next
MessageBox.show(str)