·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP.NET网站开发 >> 一个在移动设备中获取路径的方法

一个在移动设备中获取路径的方法

作者:佚名      ASP.NET网站开发编辑:admin      更新时间:2022-07-23
 一个在移动设备中获取路径的常用方法:
public string GetFileName()
{
  return System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase),"filename");

    在移动设备开发中,路径都使用绝对路径。
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase 获得应用程序的基目录,然后与文件与装配,就得到了绝对路径。
http://www.cnblogs.com/yxfqust/archive/2006/11/08/553878.html