Est-ce une question sur les instances ou les classes?
Par exemple
namespace MyCompany.MyApp.LongNamespaceName
{
public class MyClassWithALongName {
public SomeType AnInstanceProperty {get;set;}
public static SomeType AStaticProperty {get { ... }}
}
}
maintenant:
//this gets the static property
SomeType simpleName = MyClassWithALongName.AStaticProperty;
Autre possibilité:
MyClassWithALongName anInstanceWithALongName = new MyClassWithALongName();
//this gets the instance property
SomeType simpleName = anInstanceWithALongName.AnInstanceProperty;
Ceux-ci se comportent de différentes manières.
Il y a un autre cas ici cependant, vous pouvez créer un alias pour le nom réel de la classe:
using simpleName = MyCompany.MyApp.LongNamespaceName.MyClassWithALongName;
...
simpleName anInstance = new simpleName();
Ceci a un impact plus important. – Jules