cadencc
cadencc

Reputation: 9

How to write my arrays to a txt file using streamliner in VB.net

Hello I need help writing my saved arrays into a txt file I have most of the assignment done just cant get it to write to a txt file correctly.

Here is my pdf and code files

https://drive.google.com/drive/folders/1WOcdFDWDKxd-RJstfL_hzPH8r_i0nKHI?usp=sharing

I've had a buddy show me how to do it in C# but I am mainly having trouble with the syntax conversion.

   Private Sub partsForm_Load(sender As Object,
      e As EventArgs) Handles Me.Load


        'dim part as new list(of partstructure)
        'List<partstructure> _partspart(txt/blabla/txt.txt)
        ' for each s as string in values
        ' lstofstrings.add(s.part, s.price, s.description)
        ' next
        '  sw.write(dr.part.tosring() + dr.price.tostring() +fnctionspace + dr.description);
        '  sw.close()
        '  sw.dispose()
        '  dim string as teststr = part.indexof = 0
        '  teststr = teststr.string.replace("", "")
        '  part.indexof(0) = teststr

        '  dim path as string = my.application.info.directorypath  
        '  dim steramwriter as sw = new streamwriter (io.path.combine(path, "pdffile.pdf"), true)


        'Load arrays and display part information when form opens
        ChangeArraySize(3)
        number(0) = "3827"
        number(1) = "2871"
        number(2) = "8671"
        number(3) = "5986"
        price(0) = "36.74"
        price(1) = "3.21"
        price(2) = "17.93"
        price(3) = "9.21"
        description(0) = "motor"
        description(1) = "switch"
        description(2) = "wire harness"
        description(3) = "bearing"
        Sort()
        Display()
    End Sub 'partsForm_Load

I hope to be able to complete what the pdf is asking and save a copy of my arrays properly to a txt file.

Upvotes: 0

Views: 86

Answers (0)

Related Questions