0

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.

cadencc
  • 9
  • 3
  • If this is Vb.net why tag C#? – TheGeneral May 13 '19 at 03:52
  • Please don't link to external sites to include code. Put it in the question directly. Very few people will download, open, and inspect your zip file. You should make your question easy to answer. Perhaps read [ask] too. – Enigmativity May 13 '19 at 04:01
  • okay thanks for the tips guys, my first time using stack overflow – cadencc May 13 '19 at 04:09
  • It looks like you are off to a bad start. Section 14.b. The data must be trimmed and stored in single dynamic array that has a structure data type. 1. Parallel or multi-dimension arrays are not allowed in this project. It looks to me that you are using parallel arrays. – Mary May 13 '19 at 04:35

0 Answers0