これはインスタンスまたはクラスに関する質問ですか?
例えば
namespace MyCompany.MyApp.LongNamespaceName
{
public class MyClassWithALongName {
public SomeType AnInstanceProperty {get;set;}
public static SomeType AStaticProperty {get { ... }}
}
}
今:
//this gets the static property
SomeType simpleName = MyClassWithALongName.AStaticProperty;
または:
MyClassWithALongName anInstanceWithALongName = new MyClassWithALongName();
//this gets the instance property
SomeType simpleName = anInstanceWithALongName.AnInstanceProperty;
これらはさまざまな方法で動作します。
ただし、ここには別のケースがあります。クラスの実際の名前のエイリアスを作成できます。
using simpleName = MyCompany.MyApp.LongNamespaceName.MyClassWithALongName;
...
simpleName anInstance = new simpleName ();