开发者

write to a file (and read from it later) an array of structure (vb.net)

开发者 https://www.devze.com 2023-03-25 02:10 出处:网络
I have an array of structure like this: Structure Planner Dim Type As String Dim Circuit As String Dim Socket As String

I have an array of structure like this:

Structure Planner
        Dim Type As String        
        Dim Circuit As String
        Dim Socket As String
        Dim StepCMDText As String
    End Structure

how do i write it into a file? (also read it later ..开发者_StackOverflow社区.)

thanks


You could use xml serialization that is available in VB.NET. See http://support.microsoft.com/kb/316730 for details.


You could write it as a csv file but simply iterating over a list and then separating each value by a comma otherwise you could serialise it and write that to a file.

0

精彩评论

暂无评论...
验证码 换一张
取 消