2

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.

Erik Elkins
  • 629
  • 5
  • 14

1 Answers1

3

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
  • 25,526
  • 6
  • 73
  • 100