开发者

Find out if CsElement is a static field? (StyleCop custom rule)

开发者 https://www.devze.com 2023-03-06 09:59 出处:网络
How do I query a CsElement object to see 开发者_StackOverflow社区if the element is a static field?

How do I query a CsElement object to see 开发者_StackOverflow社区if the element is a static field?

I'm building a pair of m_ and s_ prefix rules for member fields and static fields.


You definitely should take a look at StyleCop+. It already contains all naming rules you're trying to create.

Moreover, it's open-source. So you can find there many examples of different code analysis cases (finding all static fields, member fields, etc.)

0

精彩评论

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