将文件 删除 到回收站 用怎样的代码?

property1 2004-09-02 07:31:19
如题
...全文
102 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
csq0516 2004-09-03
  • 打赏
  • 举报
回复
up
hxhbluestar 2004-09-02
  • 打赏
  • 举报
回复
学习!
孟子E章 2004-09-02
  • 打赏
  • 举报
回复
vb的例子
http://www.developerfusion.com/show/179/
孟子E章 2004-09-02
  • 打赏
  • 举报
回复
Unfortunately, the Environment.SpecialFolder enumeration does not include values for all of the special folders supported by the Windows API and accessible by the SHGetFolderPath function. For example, you can't obtain the 回收站 directory location from Environment.GetFolderPath. To obtain locations that aren't identified by Environment.SpecialFolder, you have to use P/Invoke to call SHGetFolderPath or SHGetFolderLocation Windows API functions. Even with those restrictions, Environment.GetFolderPath is quite useful. You should use it to obtain special folder locations rather than assuming a particular path.
You can obtain the path to the system directory, by the way, through the Environment.SystemDirectory property, or by calling Environment.GetFolderPath and passing Environment.SpecialFolder.System.
Another important directory is the current directory: the directory in which the application is executing. The Environment.CurrentDirectory property will report the current directory, and also will allow you to change the application's current location.

110,567

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧