看板 CodeJob 關於我們 聯絡資訊
'--------VB.net的版本----------------- Dim sr As New System.IO.StreamReader("C:\data.txt") Dim sw As New System.IO.StreamWriter("C:\data_out.txt") Dim data() As String = Split(sr.ReadToEnd(), " ") sr.Close() For Each s As String In data If IsNumeric(s) Then sw.WriteLine(s) sw.Flush() End If Next sw.Close() MsgBox("OK~") '-------簡單的Case用簡單的方式寫-------:D -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 60.251.170.34
waterdisney:.Net真是方便 等等會有人用C#也來一篇嗎?? 12/02 14:56
brucetu:.net應該用 sr.ReadToEnd().split(" ") 12/02 16:22