Vadim
I do what you propose and use a static class for this. Then you get the advantage of the strongly typed accessors PLUS the ability to add overrides (in the form of methods) if you require them.
here's a snippet:
public static class Config
{
private const string NotSet = "**VALUE NOT SET**";
private const int pageSize = 5;
public static string CustomCache
{
get
{
return ConfigurationManager.AppSettings["CustomCache"] ?? NotSet;
}
}
public static int PageSize
{
get
{
return pageSize;
}
}
}
typical use:
items = _repository.GetPaged(pageNumber, Config.PageSize)
"2- " web.config, , .. - , .
, , ( ) , .