A method to get the path in mobile devices
Author:Eve Cole
Update Time:2009-07-01 16:06:57
A common way to get the path on mobile devices:
public string GetFileName()
{
return System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase),"filename");
}
In mobile device development, absolute paths are used for paths.
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase gets the base directory of the application, and then combines it with the file and assembly to get the absolute path.
http://www.cnblogs.com/yxfqust/archive/2006/11/08/553878.html