I have created football (American) play creator. When the user is satisfied with a play he has created it is saved it as a file with a .play extension. What I want to do is to cycle through all the files in a folder (probably named after the team), and place each one that has the .play extension into a CList (of ClPlay) collection.
I have been able to successfully load one play at a time by using this code...
...but that was when a specific play was selected from a load dialog box. This time I want to load all the plays in a folder and store it in a collection, and I'm not sure how to modify the above code to do that.Code:Dim fs As Stream = New FileStream(diaOpenPlay.FileName, FileMode.Open) Dim bf As Runtime.Serialization.Formatters.Binary.BinaryFormatter = New Runtime.Serialization.Formatters.Binary.BinaryFormatter() Dim Play As CLPlay Play = CType(bf.Deserialize(fs), CLPlay)
Thanks in advance.![]()





Reply With Quote