Пример #1
0
        private string GetDataDirLocation()
        {
            Assembly thisAssembly     = Assembly.GetCallingAssembly();
            CommonApplicationData cad = new CommonApplicationData(thisAssembly, allUsers: false);

            return(cad.ApplicationFolderPath);
        }
Пример #2
0
        private void SetDataDirLocation()
        {
            Assembly thisAssembly     = Assembly.GetEntryAssembly();
            CommonApplicationData cad = new CommonApplicationData(thisAssembly, allUsers: false);

            AppDomain.CurrentDomain.SetData("DataDirectory", cad.ApplicationFolderPath);
        }