2010-06-28 7 views

Répondre

3

Desserrer l'accès sur votre statique FooProperty:

//access FooProperty from inside the assembly where it is defined 
internal static PropertyInfo<bool> FooProperty= 
    RegisterProperty<bool>(c => c.Foo, "Foo Friendly Name"); 

ou

//access FooProperty from anywhere 
public static PropertyInfo<bool> FooProperty= 
    RegisterProperty<bool>(c => c.Foo, "Foo Friendly Name"); 

y accéder ensuite à l'extérieur de sa catégorie:

string fooName = FooClass.FooProperty.Name;