I would like to declare an alias to the static class : System.Configuration.ConfigurationManager;
I would like this alias to be available to all the methods of my class so I've tried to do that :
public class MyClass
{
using conf = System.Configuration.ConfigurationManager;
public void MethodOne()
{
string appConfigStr = conf.AppSettings["someAppSettings"].ToString()
}
}
But the above raises the following error : Invalid token 'using' in class, struct, or interface member declaration
Is there something I can do to alias this configuration manager class ?