Okay... So I've actually made it to the final project in my Intermediate Visual Basic class. Yet, I'm still feeling stupid - like I've never attempted any project at all. I think my main confusion in this project is that we're using two seperate sequential files. I CAN and HAVE written programs involving OOP, and sequential files, but it seems the harder I am trying to incorporate the two, the more confused I get. Everyone should be relieved that I've already scheduled a two-term break from programming classes to get a better handle on this, however.... I have to pass this class in order to stay with my program. (Please don't think that I have given up on this pursuit - I just need to get a full understanding arrays, etc. before I feel I can proceed further. I have coded the following sub procedure....
Sub DisplaySavings()
Dim data() As Transaction
Dim sr As StreamReader = File.OpenText("SAVINGS.TXT")
data = sr.ReadLine.Split(","c)
Dim fmtStr As String = "{0, -18} {1, -16} {2, -12} {3, -12}"
transDate = data(0)
transType = data(1)
depAmt = data(2)
wdAmt = data(3)
Do While sr.Peek <> -1
lstTransactions.Items.Add(String.Format(fmtStr, data(0), data(1), data(2), data(3)))
Loop
End Sub
... and although this is only a portion of the code I'm struggling with, it's the point I'm stuck at.
I'm getting an error at
data = sr.ReadLine.Split(","c)
I don't know if anyone can help me without complete rubric and assignment instructions, but I AM trying to complete this with minimal help.... Any suggestions? Or do I need to provide full assignment requirements?
* I'm at a complete loss here. The more I try to code this, the more confused I'm getting. * I have attempted this project using three different methods - none of which have gotten me anywhere near understanding it. I have various coding methods halfway completed... Can anyone help? =(