我将在不传递属性的任何参数的情况下执行此操作!可能吗?
class MyAtt : Attribute {
string NameOfSettedProperty() {
//How do this? (Would be MyProp for example)
}
}
class MyCls {
[MyAtt]
int MyProp { get { return 10; } }
}
Run Code Online (Sandbox Code Playgroud)