开发者

How to set custom attribute that is only valid on return int value function

开发者 https://www.devze.com 2022-12-11 04:14 出处:网络
I know AttributeUsage class. Thi开发者_运维问答s class can set only property or method or class ...etc

I know AttributeUsage class. Thi开发者_运维问答s class can set only property or method or class ...etc I need custom attribute that is only acitve on method and method must return int value. If any function return string value, this attribute will don't work. Only work on int value.

Is there any like this attribute?

How can i create?

Is it possible?


This can only be determined at run time unfortunately. If you want to receive notification that some usage of this attribute is violating this constraint, you may want to make use of a post build action.

0

精彩评论

暂无评论...
验证码 换一张
取 消