系统IO FileNotFoundException错误 [英] System IO FileNotFoundException Error

查看:95
本文介绍了系统IO FileNotFoundException错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用ftp bu传输文件夹中的文件,但出错了.错误和代码在图片中.
http://img855.imageshack.us/img855/4531/59182060.png [ ^ ]

i want to transfer file in folder with ftp bu i took error. Error and code are in picture.
http://img855.imageshack.us/img855/4531/59182060.png[^]

推荐答案

在此处阅读: http://msdn.microsoft.com /en-us/library/system.windows.forms.folderbrowserdialog.selectedpath.aspx [
Read here: http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.selectedpath.aspx[^]
报价:

首先在对话框中选择的文件夹的路径,或者由用户选择的最后一个文件夹.

The path of the folder first selected in the dialog box or the last folder selected by the user.


您可能需要上传文件.在这种情况下,文件夹的长度没有任何意义.


You probably need a file to upload. Folder length has no meaning in this context.




该目录不应调用长度属性.如果您调用 FI.Length 作为目录,则会得到 FileNotFoundException .

请参考
MSDN中的FileInfo.Length [
Hi,

Length property should not called for the directory. if you call FI.Length for directory it will gives you FileNotFoundException.

Refer MSDN for FileInfo.Length[^]

Thanks
-Amit Gajjar


使用FolderBrowserDialog您可以选择文件夹,
您可以使用OpenFileDialog选择一个或多个文件.
有关OpenFileDialog的更多信息:
http://msdn.microsoft.com/en-us/library/system. windows.forms.openfiledialog.aspx [ ^ ]
With a FolderBrowserDialog you can select folders,
you can use a OpenFileDialog to select one or more files.
More info about OpenFileDialog:
http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx[^]


这篇关于系统IO FileNotFoundException错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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