静的クラスにエイリアスを宣言したいと思います:System.Configuration.ConfigurationManager;
このエイリアスをクラスのすべてのメソッドで利用できるようにしたいので、それを試みました:
public class MyClass
{
using conf = System.Configuration.ConfigurationManager;
public void MethodOne()
{
string appConfigStr = conf.AppSettings["someAppSettings"].ToString()
}
}
しかし、上記では次のエラーが発生します: Invalid token 'using' in class, struct, or interface member declaration
この構成マネージャー クラスにエイリアスを設定するためにできることはありますか?