如何使用C#将一个文件数据复制到Winforms中的另一个文件中
问题描述:
我正在尝试将.jpg文件从我的图片"复制到其他文件夹.我正在使用文件流,流读取器和流写入器.我有一个问题,那就是没有节省.请告诉我代码,以使用打开的文件对话将程序从一个文件保存到另一个文件,并保存文件失败控件.
I am trying to copy the .jpg file from "my pictures" to some other folder. I am using filestreams, stream reader and stream writer. I got a problem that, it is not saving. Please tell me the code to save proctures from one file to other file by using open filedialogue and save filefailogue controls.
答
为什么要使用Filestream.
您可以使用简单的
Why you are using Filestream.
you can use simple
System.IO.File.Copy("Soucefile", "destfile");
另请参见
^ ]
谢谢
--RA
See here also
Here[^]
Thanks
--RA