2 Replies - 10079 Views - Last Post: 18 May 2009 - 05:25 PM Rate Topic: -----

#1 loravenetone  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 18-May 09

Two Dimensional Array into a Table

Posted 18 May 2009 - 01:05 PM

Public Class Form1
	Dim socleag(6, 6) As String

	Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
		'Program is read the file and stores it in the array.
		Dim sr As IO.StreamReader = IO.File.OpenText("SocLeague.txt")
		For row As Integer = 0 To 6
			For col As Integer = 0 To 6
				socleag(row, col) = sr.ReadLine
			Next
		Next
		ListBox1.Items.Clear()
		For i As Integer = 0 To 6 Step 1
			For j As Integer = 0 To 6 Step 1
				ListBox1.Items.Add(socleag(i, j))
			Next
		Next
		sr.Close()
	End Sub

End Class



I tried to convert this two dimensional to a col and row table. I need help. what I am going wrong with the code.

Mod Edit: Please use code tags when posting your code. Code tags are used like so => :code:

Thanks,
PsychoCoder :)

Is This A Good Question/Topic? 0
  • +

Replies To: Two Dimensional Array into a Table

#2 PsychoCoder  Icon User is offline

  • Google.Sucks.Init(true);
  • member icon

Reputation: 1642
  • View blog
  • Posts: 19,853
  • Joined: 26-July 07

Re: Two Dimensional Array into a Table

Posted 18 May 2009 - 04:32 PM

Moved to VB.NET :)
Was This Post Helpful? 0
  • +
  • -

#3 mark.bottomley  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 176
  • View blog
  • Posts: 990
  • Joined: 22-April 09

Re: Two Dimensional Array into a Table

Posted 18 May 2009 - 05:25 PM

It would be useful to see the raw text file you are trying to read into the array.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1