c#/ .net/fxcop! ...在一個類中,我想的FxCop閉嘴抱怨 Warning CA1062 : Microsoft.Design :
In externally visible method 'xyz', validate parameter 'a' before using it.
基本上,這條規則表明,我把if (a == null) throw new ArgumentN
我有一個非常簡單的代碼(從原始代碼簡化 - 所以我知道這不是一個非常聰明的代碼),當我在代碼分析的Visual Studio 2010中編譯時,我警告CA1062:驗證公共方法的參數。 public class Foo
{
protected static void Bar(out int[] x)
{
x = new int[1];
for (int