I have n array variable set to 100. I have filled it with about 45 entries. What I am looking for a bit of code that will let me how many fields I have inputed. I am using streamreader to bring the file in and I want a count of how many entries I have inputed.
Comments
1) Have a counter that "clicks" every time you add something to the array.
2) Make sure the array has some kind of weird-value on every position from the beginning. Then, when you're done, go and look for the first occurence of that weirdo.
Kind Regards
Konrad
----------------------------
(+46/0) 708-70 73 92
chamster@home.se
http://konrads.webbsida.com
Public Sub loadusersvariables(byref filesadded as byte)
Dim fs As FileStream = New FileStream("users /" & username, _ & "/ variables.dat", FileMode.OpenOrCreate)
Dim w As BinaryReader = New BinaryReader(fs)
Dim objcts As Integer, helpers As Integer
filesadded = 0
For x = 0 To 100
user(x) = w.ReadInt32() & ControlChars.CrLf
filesadded += 1
Next
w.Close()
End Sub
'Declare filesadded as global send it to the sub as I have done here... let me know if this works for ya ok? This I changed values but have used to load variables for my application from a saved .dat file. This should be sufficient. Just change binaryreader to streamreader howver needed. If you have more questions email me at KeeblerShadowHaje@yahoo.com (leave nice subject i might mistake for junk mail