如何访问特定目录在Windows? [英] How do I access special directories in Windows?
本文介绍了如何访问特定目录在Windows?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
什么是C#语法要检索Windows用户的桌面,文件夹以及其他系统文件夹?
What is the C# syntax to retrieve the user's desktop, documents folder and other system folders on windows?
推荐答案
您可以使用<一个href="http://msdn.microsoft.com/en-us/library/system.environment.getfolderpath.aspx">Environment.GetFolderPath与<一个href="http://msdn.microsoft.com/en-us/library/system.environment.specialfolder.aspx">Environment.SpecialFolder枚举。例如:
You can use Environment.GetFolderPath with the Environment.SpecialFolder enumeration. For example:
string desktopPath = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
这篇关于如何访问特定目录在Windows?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文