How do you get the current directory where your app is running?
+5
A:
You could try this:
using System.IO;
using System.Reflection;
namespace Utilities
{
static public class DirectoryHelper
{
static public string GetCurrentDirectory ()
{
return Path.GetDirectoryName (Assembly.GetExecutingAssembly ().GetName ().CodeBase);
}
}
}
Kieron
2008-11-12 14:41:04
+3
A:
Try this:
Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase);
Todd
2008-11-12 14:41:59