public class ConfigHelper
{
/// summary> /// Gets whether the specified path is a valid absolute file path. /// /summary>
/// param name="path">Any path. OK if null or empty./param>
static public bool IsValidPath(string path)
{
Regex r = new Regex(@"^(([a-zA-Z]:)|(\))(\{1}|((\{1})[^\]([^/:*?>""|]*))+)$");
return r.IsMatch(path);
}
public static string GetString(string key)
{
return System.Configuration.ConfigurationManager.AppSettings[key];
}
}