我想通过反射机制获取属性名称.可能吗?
更新:我有这样的代码:
public CarType Car
{
get { return (Wheel) this["Wheel"];}
set { this["Wheel"] = value; }
}
Run Code Online (Sandbox Code Playgroud)
因为我需要更多这样的属性,我想做这样的事情:
public CarType Car
{
get { return (Wheel) this[GetThisPropertyName()];}
set { this[GetThisPropertyName()] = value; }
}
Run Code Online (Sandbox Code Playgroud) 我的绑定内容empty在UI设计模式中显示为字符串.我想为这些内容显示一些伪造的值,但我不知道如何.
如果你知道如何,请分享.谢谢!