tags:

views:

29

answers:

1

The property looks like this:

private static PropertyInfo<bool> FooProperty=
        RegisterProperty<bool>(c => c.Foo, "Foo Friendly Name");
public bool Foo
{
    get { return GetProperty(FooProperty); }
    private set { SetProperty(FooProperty, value); }
}

I would like to recieve "Foo Friendly Name" from outside the class.

+1  A: 

Loosen the access on your static FooProperty:

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

or

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

Then access it from outside its class:

string fooName = FooClass.FooProperty.Name;
Corbin March