Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我刚刚开始使用新的 VS2012 和 Windows 8 并创建 C# Metro 风格的项目。我想获取目录中的文件列表,但字符串“Directory.GetFiles(path)”调用一个错误,说它在当前上下文中不存在。但我使用 System.IO。我在 System.IO 中唯一有用的是“路径”——那里没有“目录”或“文件”。哪里有问题?
Windows 8 Metro 风格应用程序不支持文件系统。
相反,请使用新的 Metro API。