Is it possible to pass a property of a class to a method (outside of the class) and then retrieve that property's Description?
For example:
public class Foo { [Description("Tells whether something is true or not.")] public bool someFlag; public DoSomethingNeat() { MyUtility.getDescription(someFlag); } }
And then the pseudo-code in a utility class:
public static class MyUtility { public static string getDescription(??? property) { return property.Description; } }I suppose it might be necessary additionally to pass the type that the property belongs to.