Let's say we have a property as below
public string SomeProperty
{
get
{
var propName = "SomeProperty";
return "<" + propName + ">";
}
}
How can I set value of the above variable propName
to be the property name by reading from the assembly information itself?
Edit
Why we need this?
I'm using the WPF d:DataContext
as mentioned in here which will help me to display a 'design-mode' value for bound properties - very often, the bound values are displayed as empty string in design mode. And in the 'design-mode' data-context class, I want to return the property name for every binding properties I may have.
Hope this would explain your concerns.