来自Openfiledialog路径,文件的读取行 [英] Readlines From Openfiledialog Path , File

查看:128
本文介绍了来自Openfiledialog路径,文件的读取行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到了这一行:

i got this line:




For System in System.IO中的每一行字符串.File.ReadAllLines(Application.StartupPath&\ SEG1.txt)


For Each line As String In System.IO.File.ReadAllLines(Application.StartupPath & "\SEG1.txt")






如何更改(Application.startUpPath&\ SEG1.txt)文件路径和我位于openfiledialog的文件?



提前致谢!



how can i changed (Application.startUpPath & "\SEG1.txt") to the file path and the file i located in my openfiledialog?

Thanks in advance!

推荐答案

您无需更改任何内容。打开文件对话框为您提供文件的确切名称。如果您只需要从用户那里请求目录,那么请使用文件夹浏览器对话框。



我没有给你确切的类型名称只是因为你没有标记您正在使用的UI库。如您所知,您可以自己找出确切的对话类。



-SA
You don't have to "change" anything. Open file dialog gives you the exact name of the file. If you need to request from the user only the directory, then use a folder browser dialog.

I did not give you the exact type names just because you did not tag the UI library you are using. As you know what you are using, you can find out the exact dialog class by yourself.

—SA


这篇关于来自Openfiledialog路径,文件的读取行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆