Reputation: 2191
I have a requirement that all my .cs file variables should be protected. Is there a way to restrict adding private access modifier type variables to this type of files?
Upvotes: 0
Views: 98
Reputation: 77876
Though that's a typical requirement but if it's a organization coding rule then you can use Microsoft FxCop
static code analysis tool and define your own rule set; which then per your setting may cause the build to fail or throw warning if the rule isn't met
Upvotes: 1