I know I can read environment variables like this:
Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
However, it would be r
You can expand environment variables using then Environment.GetEnvironmentVariable
method. Given your comment, I would suggest breaking your path up into 2 separate config settings to make expanding it easier:
string variablePath = "%appdata%".Trim('%'); //read from some config setting
string appdataPath = Environment.GetEnvironmentVariable(variablePath);
string subdir = "foo"; //some other config setting
string myDir = Path.Combine(appdataPath, subdir);