BusinessCats.Util.GetStableUserPath C# (CSharp) Метод

GetStableUserPath() публичный статический Метод

public static GetStableUserPath ( ) : string
Результат string
        public static string GetStableUserPath(params string[] subdirectories)
        {
            string path = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData, Environment.SpecialFolderOption.Create);
            path = System.IO.Path.Combine(path, "BusinessCats");

            foreach(var subdirectory in subdirectories)
            {
                path = System.IO.Path.Combine(path, subdirectory);
            }

            System.IO.Directory.CreateDirectory(path);

            return path;
        }

Usage Example

Пример #1
0
 private void btnOpenFolder_Click(object sender, RoutedEventArgs e)
 {
     System.Diagnostics.Process.Start(Util.GetStableUserPath());
 }