You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using System;using System.Collections.Generic;using System.Text;
namespace Shentun.Utilities{ public class DirectoryHelper { /// <summary>
/// 返回应用程序路径,比如c:\prog
/// </summary>
/// <returns></returns>
public static string GetAppDirectory() { string str = System.AppDomain.CurrentDomain.BaseDirectory; str = str.Substring(0, str.Length - 1); return str; }
/// <summary>
/// 获取应用程序目录中文件的完整文件名,比如c:\prog\app.ini
/// </summary>
/// <param name="fileName"></param>
/// <returns></returns>
public static string GetAppDirectoryFullFileName(string fileName) { string str = System.AppDomain.CurrentDomain.BaseDirectory + fileName; return str; } }}
|