In my program, I need to copy the template database from the default location, which, as I understand it, will differ depending on the installer used. The problem is that I cannot read the actual path | DataDirectory | I understand that I have to use AppDomain.CurrentDomain.GetData ("DataDirectory"), but it always returns Null in the debugger, which means that I cannot verify my code. I tried the following two syntaxes:
string sourcePath = AppDomain.CurrentDomain.GetData("DataDirectory").ToString();
and
string defaultpath = Convert.ToString(AppDomain.CurrentDomain.GetData("DataDirectory"));
Am I doing something wrong?
Thanx!
source share