AHhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh

Permabanned
Joined
28 Jun 2006
Posts
769
Location
Midsomer Norton
Does anyone no how to randomize 2 files that are being written into an array list and display them into 2 seperate labels.

heres my code

Imports system.io

Public Class Form1

Dim nounsIn As StreamReader
Dim Nouns As New ArrayList
Dim AdjectivesIn As StreamReader
Dim Adjectives As New ArrayList

Private Sub Readfileintoarraylist(ByVal filename As String, ByVal linelist As ArrayList)


nounsIn = New StreamReader("nouns.txt")
Dim line As String

line = nounsIn.ReadLine()


Do Until line Is Nothing

Nouns.Add(line)
line = nounsIn.ReadLine()

Loop

nounsIn.Close()

End Sub

Sub btngo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btngo.Click

Readfileintoarraylist("nouns.txt", Nouns)
Readfileintoarraylist("Adjectives.Txt", Adjectives)





lblgen2.Text = CStr(Adjectives)
lblgen.Text = CStr(Nouns)

End Sub



End Class

Anyone got any ideas. Im using Visual Basic.net in visual studio 2005

HELP ME
 
Back
Top Bottom