求对文件目录类的操作AppDomain ,Environment相关类的操作
时间:2011-12-11
来源:互联网
D:\Backup\我的文档\Visual Studio 2008\Projects\tools\tools\bin\Debug\tools.exe
如题:
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
// string path = null;
//path = AppDomain.CurrentDomain.BaseDirectory;//获取当前根目录,但是不起作用
string path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
Process.Start("explorer.exe", path);
使用AppDomain 来获取当前的根目录,但是我的代码来获取后,path始终指向D:\Backup\我的文档\Visual Studio 2008\Projects\tools\tools\bin\Debug\tools.exe,请高手。如:D:\Backup,
还有 我想获取其中一个文件夹的目录 应该如何操作,如:D:\Backup\我的文档\Visual Studio 2008\Projects\tools\tools或者D:\Backup\我的文档\Visual Studio 2008\Projects,此刻怎么写?谢谢各位大侠。
如题:
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
// string path = null;
//path = AppDomain.CurrentDomain.BaseDirectory;//获取当前根目录,但是不起作用
string path = AppDomain.CurrentDomain.SetupInformation.ApplicationBase;
Process.Start("explorer.exe", path);
使用AppDomain 来获取当前的根目录,但是我的代码来获取后,path始终指向D:\Backup\我的文档\Visual Studio 2008\Projects\tools\tools\bin\Debug\tools.exe,请高手。如:D:\Backup,
还有 我想获取其中一个文件夹的目录 应该如何操作,如:D:\Backup\我的文档\Visual Studio 2008\Projects\tools\tools或者D:\Backup\我的文档\Visual Studio 2008\Projects,此刻怎么写?谢谢各位大侠。
作者: zpzp1027 发布时间: 2011-12-11
作者: hefeng_aspnet 发布时间: 2011-12-11
我就是用的这个啊 但是获取的不对啊 ?
作者: zpzp1027 发布时间: 2011-12-11
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28