vb.net 读取TXT中的所有行,并赋予一个数组的问题 20
PublicSubOpenFile()DimLinline()AsStringOpenFileDialog1.FileName=""OpenFileDialog1.Fil...
Public Sub OpenFile() Dim Linline() As String OpenFileDialog1.FileName = "" OpenFileDialog1.Filter = "文本文件(*.txt)|*.txt|数据文件(*.dat)|*.dat" OpenFileDialog1.InitialDirectory = "~\data\" OpenFileDialog1.RestoreDirectory = True OpenFileDialog1.Title = "打开" ReDim Linline(13) If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then Linline = File.ReadLines(OpenFileDialog1.FileName) TextBox1.Text = Linline(5) End If End Sub
TXT中有14行文本,想把这些文本逐行读入Linline()中,调试显示
请帮忙看看哪里出了问题,谢谢! 展开
TXT中有14行文本,想把这些文本逐行读入Linline()中,调试显示
请帮忙看看哪里出了问题,谢谢! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询