c# - Is there any way to get the instance class inside the attribute code? -
Is there a way to get an instance class inside the attribute codename C #?
Public class MyAttirbute: attribute {public someMethod () {this.InstanceClass ???? }}
No, unfortunately not.
Attributes are types and per members (such as per "some" which they are attached), not for example
You can also inspect the properties and those methods can be called without any examples of that class have been implemented to do this.
What are you trying to do that need this?
Comments
Post a Comment