Directory.GetCurrentDirectory
1.一个应用程序中,Directory.GetCurrentDirectory获得的当前工作目录是C:\Windows\System32,这是为什么呢?是如何设置的?
2.在WinXP下:System.IO.Directory.GetCurrentDirectory()方法获得的目录路径随着OpenFileDialog、SaveFileDialog等对象所确定的目录而改变。
而在Win7下不会随着改变而改变。
Directory.GetCurrentDirectory的更多相关文章
- Directory.GetCurrentDirectory和Application.StartupPath的区别
System.IO.Directory.GetCurrentDirectory()方法用于获得应用程序当前工作目录.System.Windows.Forms.Application.StartupPa ...
- 【C#遗补】获取应用程序路径之System.IO.Directory.GetCurrentDirectory和System.Windows.Forms.Application.StartupPath的区别
原文:[C#遗补]获取应用程序路径之System.IO.Directory.GetCurrentDirectory和System.Windows.Forms.Application.StartupPa ...
- C#中Directory.GetFiles() 函数的使用
C#中Directory.GetFiles(string path , string searchPattern, SearchOption searchOption ) 获取path目录中所有文件 ...
- C# IO操作(二)File类和Directory类的常用方法
本篇主要介绍一些常用的IO操作,对文件和目录的操作:留给自己复习之用. 1.创建文件 string sPath1=Path.GetDirectoryName(Assembly.GetExecuting ...
- 文件处理-Directory类 (C#)
转http://skybirdzw.blog.163.com/blog/static/7257062620099751329403/ 文件处理-Directory类 (C#) Directory.Cr ...
- c#基础语言编程-Path和Directory
引言 在程序常会对文件操作,在对文件操作中需要对文件路径的进行定位,在.Net中针对寻找文件提供两个静态类以供调用,Path和Directory. Path类 来自命名空间SYstem.IO,Path ...
- path类和directory类对文件的路径或目录进行操作
Path: 对文件或目录的路径进行操作(很方便)[只是对字符串的操作] 1.目录和文件操作的命名控件System.IO 2.string Path.ChangeExtension(string ...
- C# Directory类
Directory类 是一个静态类,常用的地方为创建目录和目录管理. 一下来看看它提供的操作. 1.CreateDirectory 根据指定路径创建目录.有重载,允许一次过创建多个目录. 2.Dele ...
- 使用File类、StreamRead和StreamWrite读写数据、以及Path类操作文件路径和Directory
1.File类的概念: File类,是一个静态类,主要是来提供一些函数库用的.静态实用类,提供了很多静态的方法,支持对文件的基本操作,包括创建,拷贝,移动,删除和 打开一个文件. File类方法的参量 ...
随机推荐
- Spring3 报org.aopalliance.intercept.MethodInterceptor问题解决方法
原文:Spring3 报org.aopalliance.intercept.MethodInterceptor问题解决方法 一 开发环境:JDK5+Spring3.0.5+Myeclipse6.6+T ...
- mapgis处理编辑属性结构时 死机问题
上午用的好好的mapgis6.7,下午就出错了,一编辑属性结构就出错,到网上查到了解决方法,和大家共享一下. 转自:http://bbs.3s001.com/forum.php?mod=viewthr ...
- (三)C#关于txt文件的读取和写入
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Tex ...
- [51NOD]BSG白山极客挑战赛
比赛链接:http://www.51nod.com/contest/problemList.html#!contestId=21 /* ━━━━━┒ギリギリ♂ eye! ┓┏┓┏┓┃キリキリ♂ min ...
- [UESTC1059]秋实大哥与小朋友(线段树, 离散化)
题目链接:http://acm.uestc.edu.cn/#/problem/show/1059 普通线段树+离散化,关键是……离散化后建树和查询都要按照基本法!!!RE了不知道多少次………………我真 ...
- Android手机开机自动启动
package com.example.x_yp.system_camera; import android.content.BroadcastReceiver; import android.con ...
- iOS开发:iOS的整体架构以及API介绍
iOS的整体架构分为4层——Cocoa Touch层.Media层.Core Services层和Core OS层,下面概要介绍一下这4层. Cocoa Touch:构建iOS应用的一些基本系统服务, ...
- IIS修改队列长度(IIS6+IIS7)
Internet Information Services (IIS) 限制了在任何给定时间可在队列中等待的应用程序池请求的最大数量.如果达到此限制,则所有新请求都将被拒绝,而且用户将收到错误消息“5 ...
- [转] Asp.net Report Viewer 简单实例
原文链接:http://www.aspsnippets.com/Green/Articles/ASPNet-Report-Viewer-control-Tutorial-with-example.as ...
- centos使用denyhosts的问题,会将自己的IP自动加到hosts.deny的解决办法。
先吐槽, 很多网站\博客,技术文章也玩伪原创, 害人不浅. 全TMD是COPY, COPY, COPY过来. 拷过来就算了, 你TMD还改了其中的内容... 改成错的.然后众多网站转载, 将错进行到底 ...