标题:[求助]
只看楼主
liang3106
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2005-2-18
 问题点数:0 回复次数:0 
[求助]

我在练习从文件中读数据时,为什么系统老是提示我 未处理的“System.IO.FileNotFoundException”类型的异常出现在 mscorlib.dll 中。

其他信息: 未能找到文件“D:\liangvb\WindowsApplication7\bin\data.txt”。 我明明建了文件data.txt放在该目录下,请帮忙,谢谢!下面是我抄的书上的程序: Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click Dim sr As IO.StreamReader Dim filename, prompt, title, street As String Dim housenum As Double prompt = "Enter the name of the file containing the information." title = "Name of File" filename = InputBox(prompt, title) sr = IO.File.OpenText(filename) housenum = CDbl(sr.ReadLine) street = sr.ReadLine sr.Close() txtbox.Text = "the street is located at" & housenum & " " & street & "." End Sub

搜索更多相关主题的帖子: Dim System txt data ByVal 
2005-02-18 22:47



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-12305-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.597105 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved