西西河

主题:谢谢各位了,我自己来行了! -- 锦候

共:💬28 🌺9
全看分页树展 · 主题 跟帖
家园 万万不敢当

放狗一大堆例子,不放狗,还可以看看Help Menu -> How Do I....

建议用单独的程序来做第一,第二步,弄清楚了再开一个新的程序把它们合并起来。

'Code Example of reading a text file line by line:

Dim FILE_NAME As String = "C:\test.txt"

Dim objReader As New System.IO.StreamReader(FILE_NAME

Dim TextLine As String

Do While objReader.Peek() <> -1

TextLine = objReader.ReadLine()

Loop

'code example of the split function

Dim str1 As String = "ppp"

Dim str2 As String = "ccc"

Dim str3 As String = "kkk"

Dim strAll3 As String = str1 + ", " + str2 + ", " + str3

Dim strArray() As String = strAll3.Split(",")

The online help of the generic dictionary example is very detailed, you can find an example from there.

Good luck again!

全看分页树展 · 主题 跟帖


有趣有益,互惠互利;开阔视野,博采众长。
虚拟的网络,真实的人。天南地北客,相逢皆朋友

Copyright © cchere 西西河