How do I query a CsElement object to see if the element is a static field?
I’m building a pair of m_ and s_ prefix rules for member fields and static fields.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.)