나는이 수업을 위해 수업을하고있다. 나는 그들이 선택 될 때마다 계산되는 4 가지 선택 사항이있는 목록 상자를 가지고 있으며, 결과를 출력하기로되어있다. 파일을 요청하면 표시되고 검색되도록 할 수있다.파일에 금액을 쓰는 방법은 무엇입니까?
Here's an image,so you can see what i mean.
여기에 지금까지 파일 일부를 가지고 코드입니다 :
이'declare a streamwriter variable
Dim outFile As IO.StreamWriter
'open file for output
outFile = IO.File.CreateText("Commercials.txt")
'write to file
For intIndex As Integer = 0 To lstCommercial.Items.Count - 1
outFile.WriteLine(lstCommercial.Items(intIndex))
Next intIndex
'close th efile
outFile.Close()
그래서 내 문제는 이것이다, 나는 모든 것이이 파일에 합계를 작성하는을 제외하고 작동시킬 수 있습니다 결과가 표시되지 않습니다. 어떻게해야합니까? 어떤 경우에 내가 뭘 잘못하고 있니?
이 lstCommercial.Items 컬렉션 객체인가? 또는 배열입니까? – happyjack
Collection 객체는 폼의로드 부분에 있습니다. – user3380748