On a continued mission to clean up the codebase I inherited, via style开发者_开发问答cop and fxcop, and one of the warnings from fxcop was CA1801: Parameter \'value\' of Something.MyProperty.set(strin
This rule indicates that开发者_开发技巧 P/Invokes should not be made public.My question is why?A caller can trivially create their own declaration within their own assembly to make the exact same call
Premise When using code analysis (or fxCop) with C# optional parameters you can get a warning of CA1026. The short reason1 for this is not suppling all parameters with a default value.
I have a开发者_JAVA百科 piece of code which deals with customers stored in database. There is an object Customer, and it has, among other, two properties of type byte[]: one property for password salt
I\'m learning T4, and am successfully interrogating my custom class for its member. What I need however, is to bring out only the properties that I created, like FirstName, Surname, and Postcode.
I\'m getting a code analysis warning on some of my unit tests: WidgetManagerTests.cs (40): CA2000 : Microsoft.Reliability : In method
I\'ll prefix by saying that I understand that both Code Analysis and StyleCop are meant as guidelines, and many people chose to ignore these anyway.But having said that, I\'d like to see what the gene
Why is the FxCop rule CA1061 a bad idea? The docs state that this rule should not be suppressed.If I have class like so:
I have base type \"Base\" in assembly \"A\" and derived type \"Child\" in assembly \"B\". I\'m using FxCop to find in assembly \"B\" types derived from \"Base\" like this:
On a Windows Server 2003 R2 with .NET 4 SDK but without Visual Studio 2010, I have tried building a Visual Studio 2010 solution with