|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Reflection;
using System.Windows.Forms;
namespace CommonUtilities
{
public class DirectoryHelper
{
/// <summary>
/// Gets the assembly directory.
/// </summary>
/// <value>
/// The assembly directory.
/// </value>
static public string AssemblyDirectory
{
get
{
var codeBase = Assembly.GetExecutingAssembly().CodeBase;
var uri = new UriBuilder(codeBase);
var path = Uri.UnescapeDataString(uri.Path);
return System.IO.Path.GetDirectoryName(path);
}
}
/// <summary>
/// Gets the Main exeutable directory.
/// </summary>
/// <value>
/// The executable directory.
/// </value>
static public string ExecutableDirectory
{
get
{
return Application.StartupPath;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Project Manager and Application Developer, in a wide variety of business applications. Particularly interested in client/server and Graphical User Interface design using Visual C#.
Specialties: 13 Y'rs in C#, 10 Y'rs experience in C++ Highly experienced in wide technologies, IT projects, military projects etc'.