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

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -