
1,2,3,4,5,6,7,8,9,,1,2,3,4,5,6,7,8,9... Would repeat causing a half wave function as shown above.
The Program, written in Visual Studio 2012 shown here in designer is backed by this code:Imports System.Text
Imports System.IO
Public Class Form1
Private Property File As StreamWriter
Sub Main()
Dim t As String = "0123456789"
Dim r As New Random
Dim s As New StringBuilder
For i As Integer = 1 To (1)
Dim idx As Integer = r.Next(0, 10)
s.Append(t.Substring(idx, 1))
Val.Text = s.ToString
File = My.Computer.FileSystem.OpenTextFileWriter("C:/Users/Desktop/9.txt", True)
File.WriteLine(Val.Text)
File.Close()
Next
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Main()
End Sub
End Class
Rather than use times simply holding the enter key constantly collects randgen output.
No comments:
Post a Comment