...Dim FS As New FileStream(arrayStorePath, FileMode.OpenOrCreate, FileAccess.Write, FileShare.None) Dim SW As New StreamWriter(FS)

For Each currentItem As String In CurrentArrayList SW.WriteLine(currentItem) Next

SW.Close() FS.Close()

...

the problem is, the system can not convert currentItem ( the object of friend class) into string, because the arraylist i created is 2D array. currentArrayList contains several inner arraylist, which is object of friend class, and each object includes its own lastname, firstname and DOB ext... the example code is really appreciated

PS, is there alternative way to write and read entire object into and from file?

I know nothing about the object as you haven't told me much about it. One time, a long time ago I wrote a toolbar and of course wanted to store the buttons but Buttons are not serializable. So I stored all of the descriptors of the buttons in a structure, stored the structures in a dictionary and they are serializable. Hence a tiny one of a kind database.

I would say yes that it's possible to store almost anything when you stop and think about it.

Sunday, January 20, 2008 2:35 PM

Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.