16,717
社区成员
发帖
与我相关
我的任务
分享
Dim aryrst As New ArrayList
Dim CurrentPosition As Integer = 0
For Each strline As String In IO.File.ReadAllLines("YourFilePathAndName") '循环每行
Dim strI As String = ""
Dim strJ As String = ""
Dim strK As String = ""
If strline.StartsWith("variable") Then Continue For
If strline.StartsWith("zone") Then
Dim strZone() As String = strline.Split(CChar(" "))
strI = strZone(1).Replace("I=", "")
strJ = strZone(1).Replace("J=", "")
strK = strZone(1).Replace("K=", "")
CurrentPosition = 0
End If
If CurrentPosition.ToString = strI Then
aryrst.Add(strline.Split(CChar(" "))(CInt(strJ)))
End If
CurrentPosition += 1
Next