当我做获取不-URI位置
string s = Path.Combine(Folders.Data, fileName);
我有file:\\...
(URI中的位置)。我怎样才能得到c:\...
(非URI-位置)?
编辑:
的文件夹类的代码是:
public static class Folders
{
public static string App
{
get
{
return Path.GetDirectoryName(
Assembly.GetAssembly(typeof(Folders)).CodeBase
);
}
}
public static string Data
{
get
{
return Path.Combine(App, "Data");
}
}
}
什么是'Folders'?似乎'Folders.Data'已经包含'file://','Path.Combine'只是添加最后一个组件。 – Vlad 2011-03-16 19:45:51
在这种情况下,“文件夹”是什么? – 2011-03-16 19:46:12
'var x = return y'?这对我来说是新的。 – 2011-03-16 19:49:31